Index: chrome/browser/ui/startup/startup_browser_creator_impl.h |
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.h b/chrome/browser/ui/startup/startup_browser_creator_impl.h |
index 8103e208e2145bb205fba476f4540029cfd4c912..108b62923638c8be04a9b4672958af6bf78f2318 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.h |
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h |
@@ -29,8 +29,15 @@ class WebContents; |
} |
namespace internals { |
+ |
GURL GetWelcomePageURL(); |
-} |
+ |
+// On Windows 10 and higher, the welcome page is shown once following each OS |
+// upgrade, even when not in first-run. When this is true, the welcome page |
+// precedes the NTP in the startup tabs, and the sync promo is not shown. |
+bool ShowWelcomePageAfterFirstRun(); |
+ |
+} // namespace internals |
// Assists launching the application and appending the initial tabs for a |
// browser window. |
@@ -79,6 +86,13 @@ class StartupBrowserCreatorImpl { |
FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs); |
FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); |
+ enum class WelcomeRunType { |
+ NONE, // Do not inject the welcome page for this run. |
+ FIRST_RUN_FIRST, // Inject the welcome page as the first first-run tab. |
+ FIRST_RUN_LAST, // Inject the welcome page as the last first-run tab. |
+ ANY_RUN_FIRST, // Inject the welcome page as the first tab. |
+ }; |
+ |
// If the process was launched with the web application command line flags, |
// e.g. --app=http://www.google.com/ or --app_id=... return true. |
// In this case |app_url| or |app_id| are populated if they're non-null. |
@@ -141,15 +155,18 @@ class StartupBrowserCreatorImpl { |
// Adds additional startup URLs to the specified vector. |
void AddStartupURLs(std::vector<GURL>* startup_urls) const; |
- // Checks whether the Preferences backup is invalid and notifies user in |
- // that case. |
- void CheckPreferencesBackup(Profile* profile); |
+ // Initializes |welcome_run_type_| for this launch. |
+ void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open); |
+ |
+ // Records that the welcome page was shown. |
+ void RecordWelcomeRunComplete() const; |
const base::FilePath cur_dir_; |
const base::CommandLine& command_line_; |
Profile* profile_; |
StartupBrowserCreator* browser_creator_; |
bool is_first_run_; |
+ WelcomeRunType welcome_run_type_; |
DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); |
}; |