OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FIRST_RUN_FIRST_RUN_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
83 std::string import_bookmarks_path; | 83 std::string import_bookmarks_path; |
84 std::string compressed_variations_seed; | 84 std::string compressed_variations_seed; |
85 std::string variations_seed; | 85 std::string variations_seed; |
86 std::string variations_seed_signature; | 86 std::string variations_seed_signature; |
87 std::string suppress_default_browser_prompt_for_version; | 87 std::string suppress_default_browser_prompt_for_version; |
88 }; | 88 }; |
89 | 89 |
90 // Returns true if this is the first time chrome is run for this user. | 90 // Returns true if this is the first time chrome is run for this user. |
91 bool IsChromeFirstRun(); | 91 bool IsChromeFirstRun(); |
92 | 92 |
93 // Testing-only function used to confirm behaviors specific to first run (or | |
94 // non-first run). | |
95 void SetFirstRunForTesting(bool is_first_run); | |
96 | |
93 #if defined(OS_MACOSX) | 97 #if defined(OS_MACOSX) |
94 // Returns true if |command_line|'s switches explicitly specify that first run | 98 // Returns true if |command_line|'s switches explicitly specify that first run |
95 // should be suppressed in the current run. | 99 // should be suppressed in the current run. |
96 bool IsFirstRunSuppressed(const base::CommandLine& command_line); | 100 bool IsFirstRunSuppressed(const base::CommandLine& command_line); |
97 #endif | 101 #endif |
98 | 102 |
99 // Returns whether metrics reporting is currently opt-in. This is used to | 103 // Returns whether metrics reporting is currently opt-in. This is used to |
100 // determine if the enable metrics reporting checkbox on first-run should be | 104 // determine if the enable metrics reporting checkbox on first-run should be |
101 // initially checked. Opt-in means it is not initially checked, opt-out means it | 105 // initially checked. Opt-in means it is not initially checked, opt-out means it |
102 // is. This is not guaranteed to be correct outside of the first-run situation, | 106 // is. This is not guaranteed to be correct outside of the first-run situation, |
(...skipping 25 matching lines...) Expand all Loading... | |
128 // exactly once, so that the browser loads the welcome tab once the | 132 // exactly once, so that the browser loads the welcome tab once the |
129 // message loop gets going. | 133 // message loop gets going. |
130 void SetShouldShowWelcomePage(); | 134 void SetShouldShowWelcomePage(); |
131 | 135 |
132 // Returns true if the welcome page should be shown. | 136 // Returns true if the welcome page should be shown. |
133 // | 137 // |
134 // This will return true only once: The first time it is called after | 138 // This will return true only once: The first time it is called after |
135 // SetShouldShowWelcomePage() is called. | 139 // SetShouldShowWelcomePage() is called. |
136 bool ShouldShowWelcomePage(); | 140 bool ShouldShowWelcomePage(); |
137 | 141 |
142 // Gets the URL for the "Welcome to Chrome" dialog. | |
143 // TODO(tmartino): Update to return new Welcome page when complete, | |
144 // subject to check against kUseNewFirstRun feature. | |
145 GURL GetWelcomePageURL(); | |
146 | |
147 // Returns true iff the current OS is Windows and the version is >= 10. | |
148 bool IsWin10(); | |
Roger Tawa OOO till Jul 10th
2016/07/26 15:00:26
Should put this inside #ifdef OS_WIN, or somehow r
tmartino
2016/07/27 18:40:43
For the time being, where we want to use this both
| |
149 | |
150 // Checks internal state regarding first-run and onboarding, and returns | |
151 // a vector, possibly empty, of tabs to be shown to the user. | |
152 std::vector<GURL> GetOnboardingTabs(); | |
153 | |
154 // Iterates over the given tabs, replacing "magic words" designated for | |
155 // use in Master Prefs files with corresponding URLs. | |
156 std::vector<GURL> ProcessMasterPrefsTabs(const std::vector<GURL>& tabs); | |
157 | |
138 // Sets a flag that will cause ShouldDoPersonalDataManagerFirstRun() | 158 // Sets a flag that will cause ShouldDoPersonalDataManagerFirstRun() |
139 // to return true exactly once, so that the browser loads | 159 // to return true exactly once, so that the browser loads |
140 // PersonalDataManager once the main message loop gets going. | 160 // PersonalDataManager once the main message loop gets going. |
141 void SetShouldDoPersonalDataManagerFirstRun(); | 161 void SetShouldDoPersonalDataManagerFirstRun(); |
142 | 162 |
143 // Returns true if the autofill personal data manager first-run action | 163 // Returns true if the autofill personal data manager first-run action |
144 // should be taken. | 164 // should be taken. |
145 // | 165 // |
146 // This will return true only once, the first time it is called after | 166 // This will return true only once, the first time it is called after |
147 // SetShouldDoPersonalDataManagerFirstRun() is called. | 167 // SetShouldDoPersonalDataManagerFirstRun() is called. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 // | 205 // |
186 // See chrome/installer/util/master_preferences.h for a description of | 206 // See chrome/installer/util/master_preferences.h for a description of |
187 // 'master_preferences' file. | 207 // 'master_preferences' file. |
188 ProcessMasterPreferencesResult ProcessMasterPreferences( | 208 ProcessMasterPreferencesResult ProcessMasterPreferences( |
189 const base::FilePath& user_data_dir, | 209 const base::FilePath& user_data_dir, |
190 MasterPrefs* out_prefs); | 210 MasterPrefs* out_prefs); |
191 | 211 |
192 } // namespace first_run | 212 } // namespace first_run |
193 | 213 |
194 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 214 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
OLD | NEW |