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

Unified Diff: chrome/browser/first_run/first_run.h

Issue 2164033002: Refactoring startup logic for upcoming FRE changes (non-Win 10). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding first unit tests Created 4 years, 4 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/first_run/first_run.cc » ('j') | chrome/browser/first_run/first_run.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run.h
diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h
index ed9addcb7fb84c62013a58f49acce6407349f0f9..1cbe12030350bfde9e8826108f6ee67150a3678a 100644
--- a/chrome/browser/first_run/first_run.h
+++ b/chrome/browser/first_run/first_run.h
@@ -87,6 +87,27 @@ struct MasterPrefs {
std::string suppress_default_browser_prompt_for_version;
};
+// Struct which accumulates various properties of the current system for
+// determining which, if any, onboarding actions should occur.
+struct FirstRunSystemStatus {
+ // Describes which 'class' of Operating System is running. Any OS's which
+ // have the same onboarding behavior are considered the same class.
+ enum OperatingSystemClass { STANDARD = 0, WINDOWS_10 };
+
+ OperatingSystemClass os_class;
+ bool is_sentinel_present;
+ bool is_force_flag_on;
+ bool is_suppress_flag_on;
+};
+
+// Gathers properties of current system which are relevant for determining
+// onboarding policy.
+FirstRunSystemStatus GetFirstRunSystemStatus();
+
+// Makes policy decisions based on the given system status, and returns
grt (UTC plus 2) 2016/08/23 10:36:02 nit: "Returns the (possibly empty) collection of f
+// a vector, possibly empty, of first-run-related tabs to be shown to the user.
+std::vector<GURL> GetOnboardingTabs(FirstRunSystemStatus status);
+
// Returns true if this is the first time chrome is run for this user.
bool IsChromeFirstRun();
@@ -135,6 +156,15 @@ void SetShouldShowWelcomePage();
// SetShouldShowWelcomePage() is called.
bool ShouldShowWelcomePage();
+// Gets the URL for the "Welcome to Chrome" dialog.
+// TODO(tmartino): Update to return new Welcome page when complete,
+// subject to check against kUseConsolidatedFirstRun feature.
+GURL GetWelcomePageURL();
grt (UTC plus 2) 2016/08/23 10:36:02 URL -> Url (http://google.github.io/styleguide/cpp
tmartino 2016/09/08 21:33:16 Done (here and throughout)
+
+// Iterates over the given tabs, replacing "magic words" designated for
+// use in Master Prefs files with corresponding URLs.
grt (UTC plus 2) 2016/08/23 10:36:02 "Master Prefs" -> "master preferences"
tmartino 2016/09/08 21:33:16 Done
+std::vector<GURL> ProcessMasterPrefsTabs(const std::vector<GURL>& tabs);
+
// Sets a flag that will cause ShouldDoPersonalDataManagerFirstRun()
// to return true exactly once, so that the browser loads
// PersonalDataManager once the main message loop gets going.
« no previous file with comments | « no previous file | chrome/browser/first_run/first_run.cc » ('j') | chrome/browser/first_run/first_run.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698