Chromium Code Reviews| 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..88352621b392974a9ee4fbb178d0ae36817675c4 100644 |
| --- a/chrome/browser/ui/startup/startup_browser_creator_impl.h |
| +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h |
| @@ -30,7 +30,7 @@ class WebContents; |
| namespace internals { |
| GURL GetWelcomePageURL(); |
| -} |
| +} // namespace internals |
| // Assists launching the application and appending the initial tabs for a |
| // browser window. |
| @@ -79,6 +79,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 +148,16 @@ 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. Also records that the |
| + // welcome page is to be injected for future launches. |
|
msw
2015/07/10 22:07:32
nit: "is to be" or "is not to be"? no joke, won't
grt (UTC plus 2)
2015/07/11 12:16:08
English... I wrote that thinking "...is to be inje
|
| + void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open); |
| 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); |
| }; |