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.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 Loading... | |
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 registry->RegisterBooleanPref(prefs::kHasSeenWelcomeUI, true); | |
Peter Kasting
2016/11/20 07:32:09
Nit: I would add a comment about why we default th
tmartino
2016/11/21 00:27:34
Good call, done
| |
489 } | |
490 | |
491 // static | |
487 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine( | 492 std::vector<GURL> StartupBrowserCreator::GetURLsFromCommandLine( |
488 const base::CommandLine& command_line, | 493 const base::CommandLine& command_line, |
489 const base::FilePath& cur_dir, | 494 const base::FilePath& cur_dir, |
490 Profile* profile) { | 495 Profile* profile) { |
491 DCHECK(profile); | 496 DCHECK(profile); |
492 | 497 |
493 std::vector<GURL> urls; | 498 std::vector<GURL> urls; |
494 | 499 |
495 const base::CommandLine::StringVector& params = command_line.GetArgs(); | 500 const base::CommandLine::StringVector& params = command_line.GetArgs(); |
496 for (size_t i = 0; i < params.size(); ++i) { | 501 for (size_t i = 0; i < params.size(); ++i) { |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
980 if (!entry->IsSigninRequired()) { | 985 if (!entry->IsSigninRequired()) { |
981 Profile* profile = profile_manager->GetProfile(entry->GetPath()); | 986 Profile* profile = profile_manager->GetProfile(entry->GetPath()); |
982 if (profile) | 987 if (profile) |
983 return profile; | 988 return profile; |
984 } | 989 } |
985 } | 990 } |
986 | 991 |
987 return nullptr; | 992 return nullptr; |
988 } | 993 } |
989 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 994 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
OLD | NEW |