diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 02:25:31 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-07-18 02:25:31 +0000 |
commit | 5e3e0963e07c653f31fd5b57f5de596f4a0863e7 (patch) | |
tree | a3c72e899a39250c0cd975b5616d9fbcccb8a160 | |
parent | 3292f537c09512d8d99cdf8e11366fed419ca6a0 (diff) | |
download | chromium_src-5e3e0963e07c653f31fd5b57f5de596f4a0863e7.zip chromium_src-5e3e0963e07c653f31fd5b57f5de596f4a0863e7.tar.gz chromium_src-5e3e0963e07c653f31fd5b57f5de596f4a0863e7.tar.bz2 |
Canary versions no longer always remove protocol handlers at startup.
Canary versions no longer check OS registration at startup as they cannot
make themselves the default OS handler.
BUG=88196
TEST=Manual
Review URL: http://codereview.chromium.org/7388009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92825 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/custom_handlers/protocol_handler_registry.cc | 3 | ||||
-rw-r--r-- | chrome/browser/shell_integration.cc | 3 | ||||
-rw-r--r-- | chrome/browser/shell_integration.h | 4 | ||||
-rw-r--r-- | chrome/browser/shell_integration_mac.mm | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chrome/browser/custom_handlers/protocol_handler_registry.cc index d7a10b8..cccc2dc 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry.cc @@ -174,7 +174,8 @@ bool ShouldRemoveHandlersNotInOS() { return false; #else const CommandLine& cmd_line = *CommandLine::ForCurrentProcess(); - return !cmd_line.HasSwitch(switches::kDisableCustomProtocolOSCheck); + return ShellIntegration::CanSetAsDefaultProtocolClient() && + !cmd_line.HasSwitch(switches::kDisableCustomProtocolOSCheck); #endif } diff --git a/chrome/browser/shell_integration.cc b/chrome/browser/shell_integration.cc index cdaef42..6780c25 100644 --- a/chrome/browser/shell_integration.cc +++ b/chrome/browser/shell_integration.cc @@ -15,8 +15,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/browser_thread.h" -bool ShellIntegration::CanSetAsDefaultProtocolClient( - const std::string& protocol) { +bool ShellIntegration::CanSetAsDefaultProtocolClient() { // Allowed as long as the browser can become the operating system default // browser. return CanSetAsDefaultBrowser(); diff --git a/chrome/browser/shell_integration.h b/chrome/browser/shell_integration.h index 7c109da..62238d7 100644 --- a/chrome/browser/shell_integration.h +++ b/chrome/browser/shell_integration.h @@ -38,8 +38,8 @@ class ShellIntegration { static bool CanSetAsDefaultBrowser(); // Returns true if the running browser can be set as the default client - // application for the given protocol. - static bool CanSetAsDefaultProtocolClient(const std::string& protocol); + // application for specific protocols. + static bool CanSetAsDefaultProtocolClient(); // On Linux, it may not be possible to determine or set the default browser // on some desktop environments or configurations. So, we use this enum and diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm index 2175d00..8821595 100644 --- a/chrome/browser/shell_integration_mac.mm +++ b/chrome/browser/shell_integration_mac.mm @@ -38,7 +38,7 @@ bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) { if (protocol.empty()) return false; - if (!CanSetAsDefaultProtocolClient(protocol)) + if (!CanSetAsDefaultProtocolClient()) return false; // We really do want the main bundle here, not base::mac::MainAppBundle(), |