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

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

Issue 2487553002: Moving new First Run to use per-profile value, rather than simply checking IsChromeFirstRun. (Closed)
Patch Set: Addressing pkasting feedback Created 4 years, 1 month 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
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.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> // For max(). 9 #include <algorithm> // For max().
10 #include <limits> 10 #include <limits>
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 PrefRegistrySimple* registry) { 477 PrefRegistrySimple* registry) {
478 #if defined(OS_WIN) 478 #if defined(OS_WIN)
479 registry->RegisterStringPref(prefs::kLastWelcomedOSVersion, std::string()); 479 registry->RegisterStringPref(prefs::kLastWelcomedOSVersion, std::string());
480 registry->RegisterBooleanPref(prefs::kWelcomePageOnOSUpgradeEnabled, true); 480 registry->RegisterBooleanPref(prefs::kWelcomePageOnOSUpgradeEnabled, true);
481 #endif 481 #endif
482 registry->RegisterBooleanPref(prefs::kSuppressUnsupportedOSWarning, false); 482 registry->RegisterBooleanPref(prefs::kSuppressUnsupportedOSWarning, false);
483 registry->RegisterBooleanPref(prefs::kWasRestarted, false); 483 registry->RegisterBooleanPref(prefs::kWasRestarted, false);
484 } 484 }
485 485
486 // static 486 // static
487 void StartupBrowserCreator::RegisterProfilePrefs(PrefRegistrySimple* registry) {
488 // Default to true so that existing users are not shown the Welcome page.
489 // ProfileManager handles setting this to false for new profiles upon
490 // creation.
491 registry->RegisterBooleanPref(prefs::kHasSeenWelcomePage, true);
492 }
493
494 // static
487 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine( 495 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine(
488 const base::CommandLine& command_line, 496 const base::CommandLine& command_line,
489 const base::FilePath& cur_dir, 497 const base::FilePath& cur_dir,
490 Profile* profile) { 498 Profile* profile) {
491 DCHECK(profile); 499 DCHECK(profile);
492 500
493 std::vector<GURL> urls; 501 std::vector<GURL> urls;
494 502
495 const base::CommandLine::StringVector& params = command_line.GetArgs(); 503 const base::CommandLine::StringVector& params = command_line.GetArgs();
496 for (size_t i = 0; i < params.size(); ++i) { 504 for (size_t i = 0; i < params.size(); ++i) {
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 if (!entry->IsSigninRequired()) { 988 if (!entry->IsSigninRequired()) {
981 Profile* profile = profile_manager->GetProfile(entry->GetPath()); 989 Profile* profile = profile_manager->GetProfile(entry->GetPath());
982 if (profile) 990 if (profile)
983 return profile; 991 return profile;
984 } 992 }
985 } 993 }
986 994
987 return nullptr; 995 return nullptr;
988 } 996 }
989 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 997 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.h ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698