summaryrefslogtreecommitdiffstats
path: root/chrome/browser/external_protocol_dialog.h
diff options
context:
space:
mode:
authornsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-08 22:33:45 +0000
committernsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-08 22:33:45 +0000
commit703e6c7fe28d047272032d2060b8b7331b43431f (patch)
tree0d8251ed2c0e2728921b1b9f650cdd631f2bba49 /chrome/browser/external_protocol_dialog.h
parentc1d552277262b3e1bcb2f9ca797a02757d021185 (diff)
downloadchromium_src-703e6c7fe28d047272032d2060b8b7331b43431f.zip
chromium_src-703e6c7fe28d047272032d2060b8b7331b43431f.tar.gz
chromium_src-703e6c7fe28d047272032d2060b8b7331b43431f.tar.bz2
Change the external protocol handler to look at the
command that will be run before warning the user. If the command is empty, there is no reason to warn. I removed a dcheck. This dcheck is good, but unfortunately we can't use g_browser_process in the io_thread. Review URL: http://codereview.chromium.org/1632 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/external_protocol_dialog.h')
-rw-r--r--chrome/browser/external_protocol_dialog.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/chrome/browser/external_protocol_dialog.h b/chrome/browser/external_protocol_dialog.h
index 4d5868e..0c48e34 100644
--- a/chrome/browser/external_protocol_dialog.h
+++ b/chrome/browser/external_protocol_dialog.h
@@ -15,12 +15,23 @@ class ExternalProtocolDialog : public ChromeViews::DialogDelegate {
public:
// Creates and runs a External Protocol dialog box.
// |url| - The url of the request.
+ // |command| - the command that ShellExecute will run.
// |render_process_host_id| and |routing_id| are used by
// tab_util::GetTabContentsByID to aquire the tab contents associated with
// this dialog.
+ // NOTE: There is a race between the Time of Check and the Time Of Use for
+ // the command line. Since the caller (web page) does not have access
+ // to change the command line by itself, we do not do anything special
+ // to protect against this scenario.
static void RunExternalProtocolDialog(const GURL& url,
+ const std::wstring& command,
int render_process_host_id,
int routing_id);
+
+ // Returns the path of the application to be launched given the protocol
+ // of the requested url. Returns an empty string on failure.
+ static std::wstring GetApplicationForProtocol(const GURL& url);
+
virtual ~ExternalProtocolDialog();
// ChromeViews::DialogDelegate Methods:
@@ -39,11 +50,8 @@ class ExternalProtocolDialog : public ChromeViews::DialogDelegate {
private:
// RunExternalProtocolDialog calls this private constructor.
ExternalProtocolDialog(TabContents* tab_contents,
- const GURL& url);
-
- // Returns the path of the application to be launched given the protocol
- // of the requested url. Returns an empty string on failure.
- std::wstring GetApplicationForProtocol();
+ const GURL& url,
+ const std::wstring& command);
// The message box view whose commands we handle.
MessageBoxView* message_box_view_;