| 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/startup_browser_creator_impl.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 browser->tab_strip_model()->GetActiveWebContents())); | 822 browser->tab_strip_model()->GetActiveWebContents())); |
| 823 | 823 |
| 824 #if !defined(OS_CHROMEOS) | 824 #if !defined(OS_CHROMEOS) |
| 825 if (!command_line_.HasSwitch(switches::kNoDefaultBrowserCheck)) { | 825 if (!command_line_.HasSwitch(switches::kNoDefaultBrowserCheck)) { |
| 826 // Generally, the default browser prompt should not be shown on first | 826 // Generally, the default browser prompt should not be shown on first |
| 827 // run. However, when the set-as-default dialog has been suppressed, we | 827 // run. However, when the set-as-default dialog has been suppressed, we |
| 828 // need to allow it. | 828 // need to allow it. |
| 829 if (!is_first_run_ || | 829 if (!is_first_run_ || |
| 830 (browser_creator_ && | 830 (browser_creator_ && |
| 831 browser_creator_->is_default_browser_dialog_suppressed())) { | 831 browser_creator_->is_default_browser_dialog_suppressed())) { |
| 832 chrome::ShowDefaultBrowserPrompt(profile_, | 832 chrome::ShowDefaultBrowserPrompt(profile_); |
| 833 browser->host_desktop_type()); | |
| 834 } | 833 } |
| 835 } | 834 } |
| 836 #endif | 835 #endif |
| 837 | 836 |
| 838 #if defined(OS_WIN) | 837 #if defined(OS_WIN) |
| 839 if (browser_creator_ && | 838 if (browser_creator_ && |
| 840 browser_creator_->show_desktop_search_redirection_infobar()) { | 839 browser_creator_->show_desktop_search_redirection_infobar()) { |
| 841 DesktopSearchRedirectionInfobarDelegate::Show( | 840 DesktopSearchRedirectionInfobarDelegate::Show( |
| 842 InfoBarService::FromWebContents( | 841 InfoBarService::FromWebContents( |
| 843 browser->tab_strip_model()->GetActiveWebContents()), | 842 browser->tab_strip_model()->GetActiveWebContents()), |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 #if defined(OS_WIN) | 1016 #if defined(OS_WIN) |
| 1018 TriggeredProfileResetter* triggered_profile_resetter = | 1017 TriggeredProfileResetter* triggered_profile_resetter = |
| 1019 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); | 1018 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); |
| 1020 // TriggeredProfileResetter instance will be nullptr for incognito profiles. | 1019 // TriggeredProfileResetter instance will be nullptr for incognito profiles. |
| 1021 if (triggered_profile_resetter) { | 1020 if (triggered_profile_resetter) { |
| 1022 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); | 1021 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); |
| 1023 } | 1022 } |
| 1024 #endif // defined(OS_WIN) | 1023 #endif // defined(OS_WIN) |
| 1025 return has_reset_trigger; | 1024 return has_reset_trigger; |
| 1026 } | 1025 } |
| OLD | NEW |