| 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 2f5652c5af5d86d4fb80a9feb4801ac1431048cb..602e2b2f3306c455f22b972a10872f3838b2c639 100644
|
| --- a/chrome/browser/ui/startup/startup_browser_creator_impl.h
|
| +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/gtest_prod_util.h"
|
| #include "base/macros.h"
|
| #include "chrome/browser/ui/startup/startup_tab.h"
|
| +#include "chrome/browser/ui/startup/startup_tab_provider.h"
|
| #include "chrome/browser/ui/startup/startup_types.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -67,6 +68,11 @@ class StartupBrowserCreatorImpl {
|
| private:
|
| FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs);
|
| FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch);
|
| + FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, DetermineStartupTabs);
|
| + FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest,
|
| + DetermineStartupTabs_IncognitoOrCrash);
|
| + FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest,
|
| + DetermineStartupTabs_MasterPrefs);
|
|
|
| enum class WelcomeRunType {
|
| NONE, // Do not inject the welcome page for this run.
|
| @@ -106,6 +112,27 @@ class StartupBrowserCreatorImpl {
|
| void ProcessLaunchURLs(bool process_startup,
|
| const std::vector<GURL>& urls_to_open);
|
|
|
| + // Determines the URLs to be shown at startup by way of various policies
|
| + // (onboarding, pinned tabs, etc.), determines whether a session restore
|
| + // is necessary, and opens the URLs in a new or restored browser accordingly.
|
| + // This method is a refactoring of ProcessLaunchURLs above, and will replace
|
| + // that code path entirely once kUseConsolidatedStartupFlow is on by default.
|
| + void ProcessLaunchUrlsUsingConsolidatedFlow(
|
| + bool process_startup,
|
| + const std::vector<GURL>& urls_to_open);
|
| +
|
| + // Returns the tabs to be shown on startup when no URLs are provided on the
|
| + // command line, based on the policy functions in the given
|
| + // StartupTabProvider, and the interactions between those policies.
|
| + StartupTabs DetermineStartupTabs(const StartupTabProvider* provider,
|
| + bool is_incognito,
|
| + bool is_post_crash_launch);
|
| +
|
| + // Opens the given tabs in a new browser.
|
| + // TODO(tmartino): Add the ability to restore a session, and an additional
|
| + // argument which indicates which behavior (new or restored) should be used.
|
| + Browser* RestoreOrCreateBrowser(StartupTabs tabs);
|
| +
|
| // Does the following:
|
| // . If the user's startup pref is to restore the last session (or the
|
| // command line flag is present to force using last session), it is
|
|
|