| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 14 | 14 |
| 15 class GURL; | 15 class GURL; |
| 16 class Profile; | 16 class Profile; |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class CommandLine; | 19 class CommandLine; |
| 20 class FilePath; | 20 class FilePath; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace content { |
| 24 class WebContents; |
| 25 } |
| 26 |
| 23 namespace user_prefs { | 27 namespace user_prefs { |
| 24 class PrefRegistrySyncable; | 28 class PrefRegistrySyncable; |
| 25 } | 29 } |
| 26 | 30 |
| 27 // This namespace contains the chrome first-run installation actions needed to | 31 // This namespace contains the chrome first-run installation actions needed to |
| 28 // fully test the custom installer. It also contains the opposite actions to | 32 // fully test the custom installer. It also contains the opposite actions to |
| 29 // execute during uninstall. When the first run UI is ready we won't | 33 // execute during uninstall. When the first run UI is ready we won't |
| 30 // do the actions unconditionally. Currently the only action is to create a | 34 // do the actions unconditionally. Currently the only action is to create a |
| 31 // desktop shortcut. | 35 // desktop shortcut. |
| 32 // | 36 // |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // exactly once, so that the browser loads the welcome tab once the | 133 // exactly once, so that the browser loads the welcome tab once the |
| 130 // message loop gets going. | 134 // message loop gets going. |
| 131 void SetShouldShowWelcomePage(); | 135 void SetShouldShowWelcomePage(); |
| 132 | 136 |
| 133 // Returns true if the welcome page should be shown. | 137 // Returns true if the welcome page should be shown. |
| 134 // | 138 // |
| 135 // This will return true only once: The first time it is called after | 139 // This will return true only once: The first time it is called after |
| 136 // SetShouldShowWelcomePage() is called. | 140 // SetShouldShowWelcomePage() is called. |
| 137 bool ShouldShowWelcomePage(); | 141 bool ShouldShowWelcomePage(); |
| 138 | 142 |
| 143 // Returns true if |contents| hosts one of the welcome pages. |
| 144 bool IsOnWelcomePage(content::WebContents* contents); |
| 145 |
| 139 // Iterates over the given tabs, replacing "magic words" designated for | 146 // Iterates over the given tabs, replacing "magic words" designated for |
| 140 // use in Master Preferences files with corresponding URLs. | 147 // use in Master Preferences files with corresponding URLs. |
| 141 std::vector<GURL> ProcessMasterPrefsTabs(const std::vector<GURL>& tabs); | 148 std::vector<GURL> ProcessMasterPrefsTabs(const std::vector<GURL>& tabs); |
| 142 | 149 |
| 143 // Sets a flag that will cause ShouldDoPersonalDataManagerFirstRun() | 150 // Sets a flag that will cause ShouldDoPersonalDataManagerFirstRun() |
| 144 // to return true exactly once, so that the browser loads | 151 // to return true exactly once, so that the browser loads |
| 145 // PersonalDataManager once the main message loop gets going. | 152 // PersonalDataManager once the main message loop gets going. |
| 146 void SetShouldDoPersonalDataManagerFirstRun(); | 153 void SetShouldDoPersonalDataManagerFirstRun(); |
| 147 | 154 |
| 148 // Returns true if the autofill personal data manager first-run action | 155 // Returns true if the autofill personal data manager first-run action |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 // | 197 // |
| 191 // See chrome/installer/util/master_preferences.h for a description of | 198 // See chrome/installer/util/master_preferences.h for a description of |
| 192 // 'master_preferences' file. | 199 // 'master_preferences' file. |
| 193 ProcessMasterPreferencesResult ProcessMasterPreferences( | 200 ProcessMasterPreferencesResult ProcessMasterPreferences( |
| 194 const base::FilePath& user_data_dir, | 201 const base::FilePath& user_data_dir, |
| 195 MasterPrefs* out_prefs); | 202 MasterPrefs* out_prefs); |
| 196 | 203 |
| 197 } // namespace first_run | 204 } // namespace first_run |
| 198 | 205 |
| 199 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 206 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |