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

Unified Diff: chrome/browser/shell_integration_linux.cc

Issue 10265025: Don't try to set the default OS level browser or protocol client on ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/shell_integration_linux.cc
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index f58b7e64030620e7b02c4e52542a8c6d95d175e9..9920f1ce9afba5629053ca375b6c7214230bd942 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -279,6 +279,9 @@ const int EXIT_XDG_SETTINGS_SYNTAX_ERROR = 1;
// If |protocol| is empty this function sets Chrome as the default browser,
// otherwise it sets Chrome as the default handler application for |protocol|.
bool SetDefaultWebClient(const std::string& protocol) {
+#if defined(OS_CHROMEOS)
+ return true;
+#else
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<base::Environment> env(base::Environment::Create());
@@ -303,6 +306,7 @@ bool SetDefaultWebClient(const std::string& protocol) {
}
return ran_ok && exit_code == EXIT_SUCCESS;
+#endif
}
// If |protocol| is empty this function checks if Chrome is the default browser,
@@ -310,6 +314,9 @@ bool SetDefaultWebClient(const std::string& protocol) {
// |protocol|.
ShellIntegration::DefaultWebClientState GetIsDefaultWebClient(
const std::string& protocol) {
+#if defined(OS_CHROMEOS)
+ return ShellIntegration::IS_DEFAULT_WEB_CLIENT;
+#else
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
scoped_ptr<base::Environment> env(base::Environment::Create());
@@ -344,6 +351,7 @@ ShellIntegration::DefaultWebClientState GetIsDefaultWebClient(
// Allow any reply that starts with "yes".
return (reply.find("yes") == 0) ? ShellIntegration::IS_DEFAULT_WEB_CLIENT :
ShellIntegration::NOT_DEFAULT_WEB_CLIENT;
+#endif
}
} // namespace
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698