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

Side by Side Diff: chrome/browser/ui/startup/startup_tab_provider.h

Issue 2635773003: Implement Win 10 onboarding content logic (Closed)
Patch Set: Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_
6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 }; 51 };
52 52
53 class StartupTabProviderImpl : public StartupTabProvider { 53 class StartupTabProviderImpl : public StartupTabProvider {
54 public: 54 public:
55 StartupTabProviderImpl() = default; 55 StartupTabProviderImpl() = default;
56 56
57 // The static Check*TabPolicy methods below enforce the policies relevant to 57 // The static Check*TabPolicy methods below enforce the policies relevant to
58 // the respective Get*Tabs methods, but do not gather or interact with any 58 // the respective Get*Tabs methods, but do not gather or interact with any
59 // system state relating to making those policy decisions. 59 // system state relating to making those policy decisions.
60 60
61 // Determines which tabs which should be shown according to onboarding/first 61 // Determines which tabs should be shown according to onboarding/first
62 // run policy. 62 // run policy.
63 static StartupTabs CheckStandardOnboardingTabPolicy( 63 static StartupTabs CheckStandardOnboardingTabPolicy(
64 bool is_first_run, 64 bool is_first_run,
65 bool has_seen_welcome_page, 65 bool has_seen_welcome_page,
66 bool is_signed_in); 66 bool is_signed_in);
67 67
68 #if defined(OS_WIN)
69 // Determines which tabs should be shown according to onboarding/first run
70 // policy, including promo content specific to Windows 10.
71 static StartupTabs CheckWin10OnboardingTabPolicy(bool is_first_run,
72 bool has_seen_welcome_page,
73 bool has_seen_win10_promo,
74 bool is_signed_in,
75 bool is_default_browser);
76 #endif
77
68 // Processes first run URLs specified in Master Preferences file, replacing 78 // Processes first run URLs specified in Master Preferences file, replacing
69 // any "magic word" URL hosts with appropriate URLs. 79 // any "magic word" URL hosts with appropriate URLs.
70 static StartupTabs CheckMasterPrefsTabPolicy( 80 static StartupTabs CheckMasterPrefsTabPolicy(
71 bool is_first_run, 81 bool is_first_run,
72 const std::vector<GURL>& first_run_tabs); 82 const std::vector<GURL>& first_run_tabs);
73 83
74 // Determines which tabs should be shown as a result of the presence/absence 84 // Determines which tabs should be shown as a result of the presence/absence
75 // of a Reset Trigger on this profile. 85 // of a Reset Trigger on this profile.
76 static StartupTabs CheckResetTriggerTabPolicy(bool profile_has_trigger); 86 static StartupTabs CheckResetTriggerTabPolicy(bool profile_has_trigger);
77 87
(...skipping 11 matching lines...) Expand all
89 // Determines whether startup preferences require the New Tab Page to be 99 // Determines whether startup preferences require the New Tab Page to be
90 // explicitly specified. Session Restore does not expect the NTP to be passed. 100 // explicitly specified. Session Restore does not expect the NTP to be passed.
91 static StartupTabs CheckNewTabPageTabPolicy(const SessionStartupPref& pref); 101 static StartupTabs CheckNewTabPageTabPolicy(const SessionStartupPref& pref);
92 102
93 // Gets the URL for the Welcome page. If |use_later_run_variant| is true, a 103 // Gets the URL for the Welcome page. If |use_later_run_variant| is true, a
94 // URL parameter will be appended so as to access the variant page used when 104 // URL parameter will be appended so as to access the variant page used when
95 // onboarding occurs after the first Chrome execution (e.g., when creating an 105 // onboarding occurs after the first Chrome execution (e.g., when creating an
96 // additional profile). 106 // additional profile).
97 static GURL GetWelcomePageUrl(bool use_later_run_variant); 107 static GURL GetWelcomePageUrl(bool use_later_run_variant);
98 108
109 #if defined(OS_WIN)
110 // Gets the URL for the Windows 10 Welcome page. If |use_later_run_variant| is
111 // true, a URL parameter will be appended so as to access the variant page
112 // used when onboarding occurs after the first Chrome execution.
113 static GURL GetWin10WelcomePageUrl(bool use_later_run_variant);
114 #endif
115
99 // Gets the URL for the page which offers to reset the user's profile 116 // Gets the URL for the page which offers to reset the user's profile
100 // settings. 117 // settings.
101 static GURL GetTriggeredResetSettingsUrl(); 118 static GURL GetTriggeredResetSettingsUrl();
102 119
103 // StartupTabProvider: 120 // StartupTabProvider:
104 StartupTabs GetOnboardingTabs(Profile* profile) const override; 121 StartupTabs GetOnboardingTabs(Profile* profile) const override;
105 StartupTabs GetDistributionFirstRunTabs( 122 StartupTabs GetDistributionFirstRunTabs(
106 StartupBrowserCreator* browser_creator) const override; 123 StartupBrowserCreator* browser_creator) const override;
107 StartupTabs GetResetTriggerTabs(Profile* profile) const override; 124 StartupTabs GetResetTriggerTabs(Profile* profile) const override;
108 StartupTabs GetPinnedTabs(const base::CommandLine& command_line, 125 StartupTabs GetPinnedTabs(const base::CommandLine& command_line,
109 Profile* profile) const override; 126 Profile* profile) const override;
110 StartupTabs GetPreferencesTabs(const base::CommandLine& command_line, 127 StartupTabs GetPreferencesTabs(const base::CommandLine& command_line,
111 Profile* profile) const override; 128 Profile* profile) const override;
112 StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line, 129 StartupTabs GetNewTabPageTabs(const base::CommandLine& command_line,
113 Profile* profile) const override; 130 Profile* profile) const override;
114 131
115 private: 132 private:
116 DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl); 133 DISALLOW_COPY_AND_ASSIGN(StartupTabProviderImpl);
117 }; 134 };
118 135
119 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_ 136 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_TAB_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/startup_browser_creator_impl.cc ('k') | chrome/browser/ui/startup/startup_tab_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698