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

Side by Side Diff: chrome/browser/ui/startup/default_browser_prompt.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/startup/default_browser_prompt.h" 5 #include "chrome/browser/ui/startup/default_browser_prompt.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 void OnCheckIsDefaultBrowserFinished( 224 void OnCheckIsDefaultBrowserFinished(
225 const base::FilePath& profile_path, 225 const base::FilePath& profile_path,
226 bool show_prompt, 226 bool show_prompt,
227 shell_integration::DefaultWebClientState state) { 227 shell_integration::DefaultWebClientState state) {
228 if (state == shell_integration::IS_DEFAULT) { 228 if (state == shell_integration::IS_DEFAULT) {
229 // Notify the user in the future if Chrome ceases to be the user's chosen 229 // Notify the user in the future if Chrome ceases to be the user's chosen
230 // default browser. 230 // default browser.
231 ResetCheckDefaultBrowserPref(profile_path); 231 ResetCheckDefaultBrowserPref(profile_path);
232 } else if (show_prompt && state == shell_integration::NOT_DEFAULT && 232 } else if (show_prompt && state == shell_integration::NOT_DEFAULT &&
233 shell_integration::CanSetAsDefaultBrowser() != 233 shell_integration::CanSetAsDefaultBrowser()) {
234 shell_integration::SET_DEFAULT_NOT_ALLOWED) {
235 ShowPrompt(); 234 ShowPrompt();
236 } 235 }
237 } 236 }
238 237
239 } // namespace 238 } // namespace
240 239
241 namespace chrome { 240 namespace chrome {
242 241
243 void RegisterDefaultBrowserPromptPrefs(PrefRegistrySimple* registry) { 242 void RegisterDefaultBrowserPromptPrefs(PrefRegistrySimple* registry) {
244 registry->RegisterStringPref( 243 registry->RegisterStringPref(
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 profile->GetPrefs()->ClearPref(prefs::kCheckDefaultBrowser); 292 profile->GetPrefs()->ClearPref(prefs::kCheckDefaultBrowser);
294 } 293 }
295 294
296 #if !defined(OS_WIN) 295 #if !defined(OS_WIN)
297 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { 296 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
298 return false; 297 return false;
299 } 298 }
300 #endif 299 #endif
301 300
302 } // namespace chrome 301 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698