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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_impl.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 | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
index 7a2e089279b4501710be7bdc0e35569f03d1d4a7..8aa3de6c5c72b52f38528fcc958fb0d43bad7a7e 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -72,7 +72,6 @@
#include "chrome/browser/ui/startup/google_api_keys_infobar_delegate.h"
#include "chrome/browser/ui/startup/obsolete_system_infobar_delegate.h"
#include "chrome/browser/ui/startup/startup_browser_creator.h"
-#include "chrome/browser/ui/startup/startup_features.h"
#include "chrome/browser/ui/tabs/pinned_tab_codec.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_constants.h"
@@ -283,14 +282,14 @@ void AppendTabs(const StartupTabs& from, StartupTabs* to) {
to->insert(to->end(), from.begin(), from.end());
}
-// Determines whether the Consolidated startup flow should be used, based on
-// the kUseConsolidatedStartupFlow Feature. Not enabled on Windows 10+.
-bool UseConsolidatedFlow() {
-#if defined(OS_WIN)
- if (base::win::GetVersion() >= base::win::VERSION_WIN10)
- return base::FeatureList::IsEnabled(features::kEnableWelcomeWin10);
-#endif // defined(OS_WIN)
- return base::FeatureList::IsEnabled(features::kUseConsolidatedStartupFlow);
+// Prevent profiles created in M56 from seeing Welcome page. See
+// crbug.com/704977.
+// TODO(tmartino): Remove this in ~M60.
+void ProcessErroneousWelcomePagePrefs(Profile* profile) {
+ const std::string kVersionErroneousWelcomeFixed = "58.0.0.0";
+ if (profile->WasCreatedByVersionOrLater(kVersionErroneousWelcomeFixed))
+ return;
+ profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, true);
}
} // namespace
@@ -381,7 +380,7 @@ bool StartupBrowserCreatorImpl::Launch(Profile* profile,
RecordLaunchModeHistogram(urls_to_open.empty() ?
LM_TO_BE_DECIDED : LM_WITH_URLS);
- if (UseConsolidatedFlow())
+ if (StartupBrowserCreator::UseConsolidatedFlow())
ProcessLaunchUrlsUsingConsolidatedFlow(process_startup, urls_to_open);
else
ProcessLaunchURLs(process_startup, urls_to_open);
@@ -627,6 +626,8 @@ void StartupBrowserCreatorImpl::ProcessLaunchUrlsUsingConsolidatedFlow(
if (process_startup && command_line_.HasSwitch(switches::kNoStartupWindow))
return;
+ ProcessErroneousWelcomePagePrefs(profile_);
+
StartupTabs cmd_line_tabs;
UrlsToTabs(cmd_line_urls, &cmd_line_tabs);
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698