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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 2775773003: [Desktop FRE] Do not show Welcome page to profiles created in M56 or M57 (Closed)
Patch Set: remove pref null check Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index c950fff0a58d0977303b0ccda95a04c745201f1e..93f1a8b9d34194814f40077227bd94e15821bef9 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -57,6 +57,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/startup/startup_browser_creator.h"
#include "chrome/browser/ui/sync/sync_promo_ui.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
@@ -996,12 +997,14 @@ void ProfileManager::InitProfileUserPrefs(Profile* profile) {
supervised_user_id);
}
#if !defined(OS_ANDROID)
- // TODO(pmonette): Fix IsNewProfile() to handle the case where the profile is
- // new even if the "Preferences" file already existed (For example: The
- // master_preferences file is dumped into the default profile on first run,
- // before profile creation).
- if (profile->IsNewProfile() || first_run::IsChromeFirstRun())
- profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, false);
+ if (StartupBrowserCreator::UseConsolidatedFlow()) {
+ // TODO(pmonette): Fix IsNewProfile() to handle the case where the profile
+ // is new even if the "Preferences" file already existed (For example: The
+ // master_preferences file is dumped into the default profile on first run,
+ // before profile creation).
+ if (profile->IsNewProfile() || first_run::IsChromeFirstRun())
+ profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, false);
+ }
#endif
}
« no previous file with comments | « no previous file | chrome/browser/ui/startup/startup_browser_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698