| 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 "chrome/browser/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/shell_integration.h" | 9 #include "chrome/browser/shell_integration.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 registrar_.RemoveAll(); | 63 registrar_.RemoveAll(); |
| 64 bool as_dialog = | 64 bool as_dialog = |
| 65 profile_->GetPrefs()->GetBoolean(prefs::kDefaultBrowserFlowDialog); | 65 profile_->GetPrefs()->GetBoolean(prefs::kDefaultBrowserFlowDialog); |
| 66 | 66 |
| 67 SetAsDefaultBrowserUI::Show(profile_, browser, as_dialog); | 67 SetAsDefaultBrowserUI::Show(profile_, browser, as_dialog); |
| 68 delete this; | 68 delete this; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace | 71 } // namespace |
| 72 | 72 |
| 73 namespace browser { | 73 namespace chrome { |
| 74 | 74 |
| 75 void ShowFirstRunDefaultBrowserPrompt(Profile* profile) { | 75 void ShowFirstRunDefaultBrowserPrompt(Profile* profile) { |
| 76 if ((ShellIntegration::IsDefaultBrowser() == | 76 if ((ShellIntegration::IsDefaultBrowser() == |
| 77 ShellIntegration::NOT_DEFAULT_WEB_CLIENT) && | 77 ShellIntegration::NOT_DEFAULT_WEB_CLIENT) && |
| 78 (ShellIntegration::CanSetAsDefaultBrowser() == | 78 (ShellIntegration::CanSetAsDefaultBrowser() == |
| 79 ShellIntegration::SET_DEFAULT_INTERACTIVE)) { | 79 ShellIntegration::SET_DEFAULT_INTERACTIVE)) { |
| 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. | 81 // user interaction, it means this couldn't have been done yet. |
| 82 SetMetroBrowserFlowLauncher::LaunchSoon(profile); | 82 SetMetroBrowserFlowLauncher::LaunchSoon(profile); |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace browser | 86 } // namespace chrome |
| OLD | NEW |