summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration_linux.cc
diff options
context:
space:
mode:
authorkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-26 07:48:02 +0000
committerkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-26 07:48:02 +0000
commit4468a5b324c9e1af0f756ccb4ba5f97a37892eb9 (patch)
tree467daa8d43f65986353d4f1bb5cf82e71cebd3a8 /chrome/browser/shell_integration_linux.cc
parente31d4c246deaefc59fe4f4fa66a74cd827694a41 (diff)
downloadchromium_src-4468a5b324c9e1af0f756ccb4ba5f97a37892eb9.zip
chromium_src-4468a5b324c9e1af0f756ccb4ba5f97a37892eb9.tar.gz
chromium_src-4468a5b324c9e1af0f756ccb4ba5f97a37892eb9.tar.bz2
Allow chrome to become the os default handler for arbitrary protocols on mac/win.
Note this is unused currently, but will be hooked up to navigator.registerProtocolHandler in a subsequent change. BUG=83556 TEST=Manual Review URL: http://codereview.chromium.org/6961013 Patch from Ben Wells <benwells@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86793 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration_linux.cc')
-rw-r--r--chrome/browser/shell_integration_linux.cc20
1 files changed, 17 insertions, 3 deletions
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index e9c7cdd..1243438 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -254,7 +254,13 @@ bool ShellIntegration::SetAsDefaultBrowser() {
}
// static
-ShellIntegration::DefaultBrowserState ShellIntegration::IsDefaultBrowser() {
+bool ShellIntegration::SetAsDefaultProtocolClient(const std::string& protocol) {
+ // TODO(benwells): Implement this for Linux - crbug.com/83557
+ return false;
+}
+
+// static
+ShellIntegration::DefaultWebClientState ShellIntegration::IsDefaultBrowser() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<base::Environment> env(base::Environment::Create());
@@ -268,11 +274,19 @@ ShellIntegration::DefaultBrowserState ShellIntegration::IsDefaultBrowser() {
std::string reply;
if (!base::GetAppOutput(CommandLine(argv), &reply)) {
// xdg-settings failed: we can't determine or set the default browser.
- return UNKNOWN_DEFAULT_BROWSER;
+ return UNKNOWN_DEFAULT_WEB_CLIENT;
}
// Allow any reply that starts with "yes".
- return (reply.find("yes") == 0) ? IS_DEFAULT_BROWSER : NOT_DEFAULT_BROWSER;
+ return (reply.find("yes") == 0) ?
+ IS_DEFAULT_WEB_CLIENT : NOT_DEFAULT_WEB_CLIENT;
+}
+
+// static
+ShellIntegration::DefaultWebClientState
+ShellIntegration::IsDefaultProtocolClient(const std::string& protocol) {
+ // TODO(benwells): Implement this for Linux - crbug.com/83557
+ return UNKNOWN_DEFAULT_WEB_CLIENT;
}
// static