OLD | NEW |
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 Loading... |
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 |
OLD | NEW |