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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 // be an app tab. | 355 // be an app tab. |
356 OpenApplicationTab(profile); | 356 OpenApplicationTab(profile); |
357 | 357 |
358 // In case of app mode + session restore we want to focus that app. | 358 // In case of app mode + session restore we want to focus that app. |
359 if (app_contents_observer.contents()) | 359 if (app_contents_observer.contents()) |
360 app_contents_observer.contents()->GetView()->SetInitialFocus(); | 360 app_contents_observer.contents()->GetView()->SetInitialFocus(); |
361 | 361 |
362 if (process_startup) { | 362 if (process_startup) { |
363 if (browser_defaults::kOSSupportsOtherBrowsers && | 363 if (browser_defaults::kOSSupportsOtherBrowsers && |
364 !command_line_.HasSwitch(switches::kNoDefaultBrowserCheck)) { | 364 !command_line_.HasSwitch(switches::kNoDefaultBrowserCheck)) { |
365 if (!chrome::ShowAutolaunchPrompt(profile)) | 365 // Generally, the default browser prompt should not be shown on first |
| 366 // run. However, when the set-as-default dialog has been suppressed, we |
| 367 // need to allow it. |
| 368 if ((!is_first_run_ || |
| 369 (browser_creator_ && |
| 370 browser_creator_->is_default_browser_dialog_suppressed())) && |
| 371 !chrome::ShowAutolaunchPrompt(profile)) { |
366 chrome::ShowDefaultBrowserPrompt(profile); | 372 chrome::ShowDefaultBrowserPrompt(profile); |
| 373 } |
367 } | 374 } |
368 #if defined(OS_MACOSX) | 375 #if defined(OS_MACOSX) |
369 // Check whether the auto-update system needs to be promoted from user | 376 // Check whether the auto-update system needs to be promoted from user |
370 // to system. | 377 // to system. |
371 KeystoneInfoBar::PromotionInfoBar(profile); | 378 KeystoneInfoBar::PromotionInfoBar(profile); |
372 #endif | 379 #endif |
373 } | 380 } |
374 } | 381 } |
375 | 382 |
376 // If we're recording or playing back, startup the EventRecorder now | 383 // If we're recording or playing back, startup the EventRecorder now |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 // New: | 912 // New: |
906 prefs->GetString(prefs::kHomePage), | 913 prefs->GetString(prefs::kHomePage), |
907 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), | 914 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), |
908 prefs->GetBoolean(prefs::kShowHomeButton), | 915 prefs->GetBoolean(prefs::kShowHomeButton), |
909 // Backup: | 916 // Backup: |
910 backup_homepage, | 917 backup_homepage, |
911 backup_homepage_is_ntp, | 918 backup_homepage_is_ntp, |
912 backup_show_home_button)); | 919 backup_show_home_button)); |
913 } | 920 } |
914 } | 921 } |
OLD | NEW |