Commit cc505440 authored by benwells@chromium.org's avatar benwells@chromium.org

Don't try to set the default OS level browser or protocol client on ChromeOS

BUG=125694
TEST=Tested default browser detection still works on Linux


Review URL: http://codereview.chromium.org/10265025

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134739 0039d316-1c4b-4281-b951-d872f2087c98
parent b869b7f3
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment