diff options
author | Andras Becsi <andras.becsi@digia.com> | 2013-07-26 19:34:08 +0200 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-07-26 23:30:30 +0200 |
commit | aebb91d9a2293b027b64601aea10d56240759050 (patch) | |
tree | fec19421f8b40aef12c886b9c4bc6c8fec33281d /shared | |
parent | 0c6e6d63d93882c3d682cdcf15f96c3d682c338d (diff) |
Fix BrowserContextQt::GetPath() to return path to user data directory
Besides returning a proper application specific user data directory,
this patch removes the duplicate definition of GetPath() which
was added by accident with the recent chromium update.
Change-Id: Ia30d598e3ef99eb88000498ef3a00ccae0593ff8
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'shared')
-rw-r--r-- | shared/shared_globals.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shared/shared_globals.h b/shared/shared_globals.h index 1e4b9183a..c0b167269 100644 --- a/shared/shared_globals.h +++ b/shared/shared_globals.h @@ -42,8 +42,19 @@ #ifndef SHARED_GLOBALS_H #define SHARED_GLOBALS_H +#include "base/files/file_path.h" #include "third_party/WebKit/public/platform/WebScreenInfo.h" +#include <QString> + +#ifdef QT_WEBENGINE_LOGGING +#define QT_NOT_YET_IMPLEMENTED fprintf(stderr, "function %s not implemented! - %s:%d\n", __func__, __FILE__, __LINE__); +#define QT_NOT_USED fprintf(stderr, "# function %s should not be used! - %s:%d\n", __func__, __FILE__, __LINE__); Q_UNREACHABLE(); +#else +#define QT_NOT_YET_IMPLEMENTED qt_noop(); +#define QT_NOT_USED Q_UNREACHABLE(); // This will assert in debug. +#endif + namespace content { class WebContentsImpl; class WebContentsViewPort; @@ -55,4 +66,14 @@ class QWindow; void GetScreenInfoFromNativeWindow(QWindow* window, WebKit::WebScreenInfo* results); + +inline base::FilePath::StringType qStringToStringType(const QString &str) +{ +#if defined(OS_POSIX) + return str.toStdString(); +#elif defined(OS_WIN) + return str.toStdWString(); +#endif +} + #endif |