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

Side by Side Diff: chrome/browser/ui/startup/default_browser_prompt_win.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 "base/macros.h" 7 #include "base/macros.h"
8 #include "base/win/windows_version.h" 8 #include "base/win/windows_version.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/shell_integration.h" 10 #include "chrome/browser/shell_integration.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { 74 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
75 // The behavior on Windows 10 is no good at the moment, since there is no 75 // The behavior on Windows 10 is no good at the moment, since there is no
76 // known way to lead the user directly to a default browser picker. 76 // known way to lead the user directly to a default browser picker.
77 if (base::win::GetVersion() >= base::win::VERSION_WIN10) 77 if (base::win::GetVersion() >= base::win::VERSION_WIN10)
78 return false; 78 return false;
79 79
80 // If the only available mode of setting the default browser requires 80 // If the only available mode of setting the default browser requires
81 // user interaction, it means this couldn't have been done yet. Therefore, 81 // user interaction, it means this couldn't have been done yet. Therefore,
82 // we launch the dialog and inform the caller of it. 82 // we launch the dialog and inform the caller of it.
83 bool show_status = (shell_integration::CanSetAsDefaultBrowser() == 83 bool show_status = (shell_integration::GetDefaultWebClientSetPermission() ==
84 shell_integration::SET_DEFAULT_INTERACTIVE) && 84 shell_integration::SET_DEFAULT_INTERACTIVE) &&
85 (shell_integration::GetDefaultBrowser() == 85 (shell_integration::GetDefaultBrowser() ==
86 shell_integration::NOT_DEFAULT); 86 shell_integration::NOT_DEFAULT);
87 87
88 if (show_status) { 88 if (show_status) {
89 startup_metric_utils::SetNonBrowserUIDisplayed(); 89 startup_metric_utils::SetNonBrowserUIDisplayed();
90 SetMetroBrowserFlowLauncher::LaunchSoon(profile); 90 SetMetroBrowserFlowLauncher::LaunchSoon(profile);
91 } 91 }
92 92
93 return show_status; 93 return show_status;
94 } 94 }
95 95
96 } // namespace chrome 96 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698