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

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: Reverted the most recent name change. 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 // 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 bool permit_prompt_on_first_run = browser_creator_ &&
gab 2012/07/26 17:06:18 nit: s/bool/const bool This make it clearer to th
Peter Kasting 2012/07/27 18:48:06 I'd probably just inline the whole thing into the
motek. 2012/07/28 17:46:44 Done.
motek. 2012/07/28 17:46:44 Inlined explicitly as suggested by pkasting@.
369 browser_creator_->is_set_as_default_dialog_suppressed();
370 if ((!is_first_run_ || permit_prompt_on_first_run) &&
371 !chrome::ShowAutolaunchPrompt(profile)) {
Peter Kasting 2012/07/27 18:48:06 Nit: {} unnecessary
motek. 2012/07/28 17:46:44 But the convention in this file seems to be that i
Peter Kasting 2012/07/28 17:50:41 I think you're probably right.
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698