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

Unified Diff: chrome/browser/ui/webui/options2/browser_options_handler2.cc

Issue 10453041: Support for interactive set-chrome-as-default in Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the reviewer's remark. Created 8 years, 6 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 | « chrome/browser/ui/webui/options2/browser_options_handler2.h ('k') | chrome/installer/util/shell_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options2/browser_options_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/browser_options_handler2.cc b/chrome/browser/ui/webui/options2/browser_options_handler2.cc
index b5f272e0f97ac27ea8c3e7f1b406109fd18d6b7d..2ef0580b6c2c51930587a52150084438fbf976b8 100644
--- a/chrome/browser/ui/webui/options2/browser_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/browser_options_handler2.cc
@@ -675,7 +675,8 @@ void BrowserOptionsHandler::CheckAutoLaunchCallback(
void BrowserOptionsHandler::UpdateDefaultBrowserState() {
// Check for side-by-side first.
- if (!ShellIntegration::CanSetAsDefaultBrowser()) {
+ if (ShellIntegration::CanSetAsDefaultBrowser() ==
+ ShellIntegration::SET_DEFAULT_NOT_ALLOWED) {
SetDefaultBrowserUIString(IDS_OPTIONS_DEFAULTBROWSER_SXS);
return;
}
@@ -742,6 +743,10 @@ void BrowserOptionsHandler::SetDefaultWebClientUIState(
SetDefaultBrowserUIString(status_string_id);
}
+bool BrowserOptionsHandler::IsInteractiveSetDefaultPermitted() {
+ return true; // This is UI so we can allow it.
+}
+
void BrowserOptionsHandler::SetDefaultBrowserUIString(int status_string_id) {
scoped_ptr<Value> status_string(Value::CreateStringValue(
l10n_util::GetStringFUTF16(status_string_id,
« no previous file with comments | « chrome/browser/ui/webui/options2/browser_options_handler2.h ('k') | chrome/installer/util/shell_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698