summaryrefslogtreecommitdiffstats
path: root/chrome/browser/platform_util.h
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 17:16:12 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 17:16:12 +0000
commit7f0a3efa2be4ef44c027c44dec637e6c3bbef42f (patch)
tree402e205d9ec8a834819165460dfe52c8141fb8c7 /chrome/browser/platform_util.h
parentad74aa6434bc3a5b095a2fccb885007cbb7d1410 (diff)
downloadchromium_src-7f0a3efa2be4ef44c027c44dec637e6c3bbef42f.zip
chromium_src-7f0a3efa2be4ef44c027c44dec637e6c3bbef42f.tar.gz
chromium_src-7f0a3efa2be4ef44c027c44dec637e6c3bbef42f.tar.bz2
Stop using GetDefaultProfile() in Chrome OS implementation of platform_util::OpenExternal()
Add Profile* as an argument of OpenExternal(). Disallow calling OpenExternal() from threads other than UI thread. Changes for the implementations: Chrome OS implementation: Use the argument Profile and stop posting tasks to UI thread. Win implementation: Post tasks to FILE thread. (for the reason noted in external_protocol_handler.cc) Other implementations: Just add Profile* argument and add thread check. Changes for user code: 1. first_run_dialog.cc: Just pass Profile*. 2. browser_commands.cc: Pass Profile* acquired from Browser. 3. chrome_shell_window_delegate.cc: Pass Profile* acquired from WebContents. 4. external_protocol_handler.cc: Pass Profile* acquired with a pair of render_process_host_id and tab_contents_id. BUG=322682 TEST=git cl try Review URL: https://codereview.chromium.org/107033003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/platform_util.h')
-rw-r--r--chrome/browser/platform_util.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/platform_util.h b/chrome/browser/platform_util.h
index 0f19494..c2008a1 100644
--- a/chrome/browser/platform_util.h
+++ b/chrome/browser/platform_util.h
@@ -11,6 +11,7 @@
#include "ui/gfx/native_widget_types.h"
class GURL;
+class Profile;
namespace base {
class FilePath;
@@ -28,7 +29,8 @@ void OpenItem(const base::FilePath& full_path);
// Open the given external protocol URL in the desktop's default manner.
// (For example, mailto: URLs in the default mail user agent.)
-void OpenExternal(const GURL& url);
+// Must be called from the UI thread.
+void OpenExternal(Profile* profile, const GURL& url);
// Get the top level window for the native view. This can return NULL.
gfx::NativeWindow GetTopLevel(gfx::NativeView view);
@@ -54,6 +56,6 @@ bool IsVisible(gfx::NativeView view);
bool IsSwipeTrackingFromScrollEventsEnabled();
#endif
-} // platform_util
+} // namespace platform_util
#endif // CHROME_BROWSER_PLATFORM_UTIL_H_