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

Unified Diff: chrome/browser/ui/startup/startup_tab_provider.h

Issue 2396133002: Adding Pinned Tab and Preferences-specified Tab logic to Startup Flow refactor (Closed)
Patch Set: Correcting initializer nit Created 4 years, 2 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
Index: chrome/browser/ui/startup/startup_tab_provider.h
diff --git a/chrome/browser/ui/startup/startup_tab_provider.h b/chrome/browser/ui/startup/startup_tab_provider.h
index 5716913c23bb3fef9a1c15abaa4a53b12cd15315..5100fd6ced7ffa0295496c59c3c7e8add404942a 100644
--- a/chrome/browser/ui/startup/startup_tab_provider.h
+++ b/chrome/browser/ui/startup/startup_tab_provider.h
@@ -36,11 +36,12 @@ class StartupTabProvider {
virtual StartupTabs GetResetTriggerTabs(Profile* profile) const = 0;
// Returns the user's pinned tabs.
- virtual StartupTabs GetPinnedTabs() const = 0;
+ virtual StartupTabs GetPinnedTabs(Profile* profile) const = 0;
// Returns tabs, if any, specified in the user's preferences as the default
// content for a new window.
- virtual StartupTabs GetPreferencesTabs() const = 0;
+ virtual StartupTabs GetPreferencesTabs(const base::CommandLine& command_line,
+ Profile* profile) const = 0;
};
class StartupTabProviderImpl : public StartupTabProvider {
@@ -65,6 +66,11 @@ class StartupTabProviderImpl : public StartupTabProvider {
// of a Reset Trigger on this profile.
static StartupTabs CheckResetTriggerTabPolicy(bool profile_has_trigger);
+ // Determines whether preferences indicate that user-specified tabs should be
+ // shown as the default new window content, and returns the specified tabs if
+ // so.
+ static StartupTabs CheckPreferencesTabPolicy(SessionStartupPref pref);
+
// Gets the URL for the "Welcome to Chrome" page.
static GURL GetWelcomePageUrl();
@@ -77,8 +83,9 @@ class StartupTabProviderImpl : public StartupTabProvider {
StartupTabs GetDistributionFirstRunTabs(
StartupBrowserCreator* browser_creator) const override;
StartupTabs GetResetTriggerTabs(Profile* profile) const override;
- StartupTabs GetPinnedTabs() const override;
- StartupTabs GetPreferencesTabs() const override;
+ StartupTabs GetPinnedTabs(Profile* profile) const override;
+ StartupTabs GetPreferencesTabs(const base::CommandLine& command_line,
+ Profile* profile) const override;
private:
DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl);

Powered by Google App Engine
This is Rietveld 408576698