Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: chrome/browser/shell_integration_linux.cc

Issue 6961013: Allow chrome to become the os default handler for arbitrary protocols on mac/win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More changes for comments; fix for a bug introduced with DefaultWebClientWorker refactoring Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/shell_integration_linux.cc
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index e9c7cdda22de7359785f97f4fa2ad1f85f09f50f..12434381ecaa1947bc9f788d8bcdebb6565a50a1 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

Powered by Google App Engine
This is Rietveld 408576698