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

Side by Side Diff: chrome/browser/ui/startup/default_browser_prompt_win.cc

Issue 1229213006: Do not show the first-run default browser prompt on Win10. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revised comment Created 5 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/win/windows_version.h"
8 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/shell_integration.h" 10 #include "chrome/browser/shell_integration.h"
10 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_finder.h" 12 #include "chrome/browser/ui/browser_finder.h"
12 #include "chrome/browser/ui/webui/set_as_default_browser_ui.h" 13 #include "chrome/browser/ui/webui/set_as_default_browser_ui.h"
13 #include "components/startup_metric_utils/startup_metric_utils.h" 14 #include "components/startup_metric_utils/startup_metric_utils.h"
14 #include "content/public/browser/browser_thread.h" 15 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/notification_service.h" 16 #include "content/public/browser/notification_service.h"
16 #include "content/public/browser/notification_types.h" 17 #include "content/public/browser/notification_types.h"
17 18
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 registrar_.RemoveAll(); 64 registrar_.RemoveAll();
64 SetAsDefaultBrowserUI::Show(profile_, browser); 65 SetAsDefaultBrowserUI::Show(profile_, browser);
65 delete this; 66 delete this;
66 } 67 }
67 68
68 } // namespace 69 } // namespace
69 70
70 namespace chrome { 71 namespace chrome {
71 72
72 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { 73 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) {
74 // The behavior on Windows 10 is no good at the moment, since there is no
75 // known way to lead the user directly to a default browser picker.
76 if (base::win::GetVersion() >= base::win::VERSION_WIN10)
77 return false;
78
73 // If the only available mode of setting the default browser requires 79 // If the only available mode of setting the default browser requires
74 // user interaction, it means this couldn't have been done yet. Therefore, 80 // user interaction, it means this couldn't have been done yet. Therefore,
75 // we launch the dialog and inform the caller of it. 81 // we launch the dialog and inform the caller of it.
76 bool show_status = 82 bool show_status =
77 (ShellIntegration::CanSetAsDefaultBrowser() == 83 (ShellIntegration::CanSetAsDefaultBrowser() ==
78 ShellIntegration::SET_DEFAULT_INTERACTIVE) && 84 ShellIntegration::SET_DEFAULT_INTERACTIVE) &&
79 (ShellIntegration::GetDefaultBrowser() == ShellIntegration::NOT_DEFAULT); 85 (ShellIntegration::GetDefaultBrowser() == ShellIntegration::NOT_DEFAULT);
80 86
81 if (show_status) { 87 if (show_status) {
82 startup_metric_utils::SetNonBrowserUIDisplayed(); 88 startup_metric_utils::SetNonBrowserUIDisplayed();
83 SetMetroBrowserFlowLauncher::LaunchSoon(profile); 89 SetMetroBrowserFlowLauncher::LaunchSoon(profile);
84 } 90 }
85 91
86 return show_status; 92 return show_status;
87 } 93 }
88 94
89 } // namespace chrome 95 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698