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

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: Adding tests 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 <memory> 10 #include <memory>
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 PrefRegistrySimple* registry) { 475 PrefRegistrySimple* registry) {
476 #if defined(OS_WIN) 476 #if defined(OS_WIN)
477 registry->RegisterStringPref(prefs::kLastWelcomedOSVersion, std::string()); 477 registry->RegisterStringPref(prefs::kLastWelcomedOSVersion, std::string());
478 registry->RegisterBooleanPref(prefs::kWelcomePageOnOSUpgradeEnabled, true); 478 registry->RegisterBooleanPref(prefs::kWelcomePageOnOSUpgradeEnabled, true);
479 #endif 479 #endif
480 registry->RegisterBooleanPref(prefs::kSuppressUnsupportedOSWarning, false); 480 registry->RegisterBooleanPref(prefs::kSuppressUnsupportedOSWarning, false);
481 registry->RegisterBooleanPref(prefs::kWasRestarted, false); 481 registry->RegisterBooleanPref(prefs::kWasRestarted, false);
482 } 482 }
483 483
484 // static 484 // static
485 void StartupBrowserCreator::RegisterProfilePrefs(PrefRegistrySimple* registry) {
486 registry->RegisterBooleanPref(prefs::kHasSeenWelcomeUI, false);
487 }
488
489 // static
485 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine( 490 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine(
486 const base::CommandLine& command_line, 491 const base::CommandLine& command_line,
487 const base::FilePath& cur_dir, 492 const base::FilePath& cur_dir,
488 Profile* profile) { 493 Profile* profile) {
489 DCHECK(profile); 494 DCHECK(profile);
490 495
491 std::vector<GURL> urls; 496 std::vector<GURL> urls;
492 497
493 const base::CommandLine::StringVector& params = command_line.GetArgs(); 498 const base::CommandLine::StringVector& params = command_line.GetArgs();
494 for (size_t i = 0; i < params.size(); ++i) { 499 for (size_t i = 0; i < params.size(); ++i) {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 if (!entry->IsSigninRequired()) { 956 if (!entry->IsSigninRequired()) {
952 Profile* profile = profile_manager->GetProfile(entry->GetPath()); 957 Profile* profile = profile_manager->GetProfile(entry->GetPath());
953 if (profile) 958 if (profile)
954 return profile; 959 return profile;
955 } 960 }
956 } 961 }
957 962
958 return nullptr; 963 return nullptr;
959 } 964 }
960 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 965 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698