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 <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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 | 225 |
226 void OnCheckIsDefaultBrowserFinished( | 226 void OnCheckIsDefaultBrowserFinished( |
227 const base::FilePath& profile_path, | 227 const base::FilePath& profile_path, |
228 bool show_prompt, | 228 bool show_prompt, |
229 shell_integration::DefaultWebClientState state) { | 229 shell_integration::DefaultWebClientState state) { |
230 if (state == shell_integration::IS_DEFAULT) { | 230 if (state == shell_integration::IS_DEFAULT) { |
231 // Notify the user in the future if Chrome ceases to be the user's chosen | 231 // Notify the user in the future if Chrome ceases to be the user's chosen |
232 // default browser. | 232 // default browser. |
233 ResetCheckDefaultBrowserPref(profile_path); | 233 ResetCheckDefaultBrowserPref(profile_path); |
234 } else if (show_prompt && state == shell_integration::NOT_DEFAULT && | 234 } else if (show_prompt && state == shell_integration::NOT_DEFAULT && |
235 shell_integration::CanSetAsDefaultBrowser() != | 235 shell_integration::CanSetAsDefaultBrowser()) { |
236 shell_integration::SET_DEFAULT_NOT_ALLOWED) { | |
237 ShowPrompt(); | 236 ShowPrompt(); |
238 } | 237 } |
239 } | 238 } |
240 | 239 |
241 } // namespace | 240 } // namespace |
242 | 241 |
243 namespace chrome { | 242 namespace chrome { |
244 | 243 |
245 void RegisterDefaultBrowserPromptPrefs(PrefRegistrySimple* registry) { | 244 void RegisterDefaultBrowserPromptPrefs(PrefRegistrySimple* registry) { |
246 registry->RegisterStringPref( | 245 registry->RegisterStringPref( |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 ->StartCheckIsDefault(); | 286 ->StartCheckIsDefault(); |
288 } | 287 } |
289 | 288 |
290 #if !defined(OS_WIN) | 289 #if !defined(OS_WIN) |
291 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { | 290 bool ShowFirstRunDefaultBrowserPrompt(Profile* profile) { |
292 return false; | 291 return false; |
293 } | 292 } |
294 #endif | 293 #endif |
295 | 294 |
296 } // namespace chrome | 295 } // namespace chrome |
OLD | NEW |