Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 10702097: Adds browser preferences to configure first-run flow on Windows 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed grt@'s remarks. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 if (!chrome::ShowAutolaunchPrompt(profile)) {
366 chrome::ShowDefaultBrowserPrompt(profile); 366 // The prompt is allowed on first-run when the set-as-default dialog
367 // has been suppressed.
368 bool permit_prompt_on_first_run = browser_creator_ &&
369 browser_creator_->get_suppressed_set_as_default_dialog();
370 chrome::ShowDefaultBrowserPrompt(profile,
371 permit_prompt_on_first_run);
372 }
367 } 373 }
368 #if defined(OS_MACOSX) 374 #if defined(OS_MACOSX)
369 // Check whether the auto-update system needs to be promoted from user 375 // Check whether the auto-update system needs to be promoted from user
370 // to system. 376 // to system.
371 KeystoneInfoBar::PromotionInfoBar(profile); 377 KeystoneInfoBar::PromotionInfoBar(profile);
372 #endif 378 #endif
373 } 379 }
374 } 380 }
375 381
376 // If we're recording or playing back, startup the EventRecorder now 382 // If we're recording or playing back, startup the EventRecorder now
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 // New: 911 // New:
906 prefs->GetString(prefs::kHomePage), 912 prefs->GetString(prefs::kHomePage),
907 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), 913 prefs->GetBoolean(prefs::kHomePageIsNewTabPage),
908 prefs->GetBoolean(prefs::kShowHomeButton), 914 prefs->GetBoolean(prefs::kShowHomeButton),
909 // Backup: 915 // Backup:
910 backup_homepage, 916 backup_homepage,
911 backup_homepage_is_ntp, 917 backup_homepage_is_ntp,
912 backup_show_home_button)); 918 backup_show_home_button));
913 } 919 }
914 } 920 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698