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..756770c869965545c82257ed0308dc4d45b9ce1e 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 content a new or restored browser accordingly. |
grt (UTC plus 2)
2016/09/09 11:40:30
"opens the content"?
|
+ // 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, based on the policy functions |
grt (UTC plus 2)
2016/09/09 11:40:30
...on startup when no URLs are provided on the com
|
+ // in the given StartupTabProvider, and the interactions between those |
+ // policies. |
+ StartupTabs DetermineStartupTabs(StartupTabProvider* provider, |
+ bool is_incognito, |
+ bool is_crash); |
+ |
+ // 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 |