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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.cc

Issue 1832853003: DefaultBrowserWorker now fully supports opening the settings for Win10 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix mac compilation Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 void BrowserOptionsHandler::OnDefaultBrowserWorkerFinished( 1150 void BrowserOptionsHandler::OnDefaultBrowserWorkerFinished(
1151 shell_integration::DefaultWebClientState state) { 1151 shell_integration::DefaultWebClientState state) {
1152 int status_string_id; 1152 int status_string_id;
1153 1153
1154 if (state == shell_integration::IS_DEFAULT) { 1154 if (state == shell_integration::IS_DEFAULT) {
1155 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_DEFAULT; 1155 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_DEFAULT;
1156 // Notify the user in the future if Chrome ceases to be the user's chosen 1156 // Notify the user in the future if Chrome ceases to be the user's chosen
1157 // default browser. 1157 // default browser.
1158 chrome::ResetDefaultBrowserPrompt(Profile::FromWebUI(web_ui())); 1158 chrome::ResetDefaultBrowserPrompt(Profile::FromWebUI(web_ui()));
1159 } else if (state == shell_integration::NOT_DEFAULT) { 1159 } else if (state == shell_integration::NOT_DEFAULT) {
1160 if (shell_integration::CanSetAsDefaultBrowser() == 1160 if (shell_integration::CanSetAsDefaultBrowser()) {
1161 shell_integration::SET_DEFAULT_NOT_ALLOWED) { 1161 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_NOTDEFAULT;
1162 } else {
1162 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_SXS; 1163 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_SXS;
1163 } else {
1164 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_NOTDEFAULT;
1165 } 1164 }
1166 } else if (state == shell_integration::UNKNOWN_DEFAULT) { 1165 } else if (state == shell_integration::UNKNOWN_DEFAULT) {
1167 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN; 1166 status_string_id = IDS_OPTIONS_DEFAULTBROWSER_UNKNOWN;
1168 } else { 1167 } else {
1169 NOTREACHED(); 1168 NOTREACHED();
1170 return; 1169 return;
1171 } 1170 }
1172 1171
1173 SetDefaultBrowserUIString(status_string_id); 1172 SetDefaultBrowserUIString(status_string_id);
1174 } 1173 }
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
2165 2164
2166 bool BrowserOptionsHandler::IsDeviceOwnerProfile() { 2165 bool BrowserOptionsHandler::IsDeviceOwnerProfile() {
2167 #if defined(OS_CHROMEOS) 2166 #if defined(OS_CHROMEOS)
2168 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui())); 2167 return chromeos::ProfileHelper::IsOwnerProfile(Profile::FromWebUI(web_ui()));
2169 #else 2168 #else
2170 return true; 2169 return true;
2171 #endif 2170 #endif
2172 } 2171 }
2173 2172
2174 } // namespace options 2173 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698