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

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

Issue 2635773003: Implement Win 10 onboarding content logic (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 void StartupBrowserCreator::ClearLaunchedProfilesForTesting() { 471 void StartupBrowserCreator::ClearLaunchedProfilesForTesting() {
472 profile_launch_observer.Get().Clear(); 472 profile_launch_observer.Get().Clear();
473 } 473 }
474 474
475 // static 475 // static
476 void StartupBrowserCreator::RegisterLocalStatePrefs( 476 void StartupBrowserCreator::RegisterLocalStatePrefs(
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 registry->RegisterBooleanPref(prefs::kHasSeenWin10PromoPage, false);
481 #endif 482 #endif
482 registry->RegisterBooleanPref(prefs::kSuppressUnsupportedOSWarning, false); 483 registry->RegisterBooleanPref(prefs::kSuppressUnsupportedOSWarning, false);
483 registry->RegisterBooleanPref(prefs::kWasRestarted, false); 484 registry->RegisterBooleanPref(prefs::kWasRestarted, false);
484 } 485 }
485 486
486 // static 487 // static
487 void StartupBrowserCreator::RegisterProfilePrefs(PrefRegistrySimple* registry) { 488 void StartupBrowserCreator::RegisterProfilePrefs(PrefRegistrySimple* registry) {
488 // Default to true so that existing users are not shown the Welcome page. 489 // 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 // ProfileManager handles setting this to false for new profiles upon
490 // creation. 491 // creation.
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 if (!entry->IsSigninRequired()) { 989 if (!entry->IsSigninRequired()) {
989 Profile* profile = profile_manager->GetProfile(entry->GetPath()); 990 Profile* profile = profile_manager->GetProfile(entry->GetPath());
990 if (profile) 991 if (profile)
991 return profile; 992 return profile;
992 } 993 }
993 } 994 }
994 995
995 return nullptr; 996 return nullptr;
996 } 997 }
997 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 998 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698