| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // Sets the kShouldShowWelcomePage local state pref so that the browser | 121 // Sets the kShouldShowWelcomePage local state pref so that the browser |
| 122 // loads the welcome tab once the message loop gets going. Returns false | 122 // loads the welcome tab once the message loop gets going. Returns false |
| 123 // if the pref could not be set. | 123 // if the pref could not be set. |
| 124 static bool SetShowWelcomePagePref(); | 124 static bool SetShowWelcomePagePref(); |
| 125 | 125 |
| 126 // Sets the kAutofillPersonalDataManagerFirstRun local state pref so that the | 126 // Sets the kAutofillPersonalDataManagerFirstRun local state pref so that the |
| 127 // browser loads PersonalDataManager once the main message loop gets going. | 127 // browser loads PersonalDataManager once the main message loop gets going. |
| 128 // Returns false if the pref could not be set. | 128 // Returns false if the pref could not be set. |
| 129 static bool SetPersonalDataManagerFirstRunPref(); | 129 static bool SetPersonalDataManagerFirstRunPref(); |
| 130 | 130 |
| 131 // True if special circumstances should prevent the search engine ballot from | |
| 132 // being shown. | |
| 133 static bool SearchEngineSelectorDisallowed(); | |
| 134 | |
| 135 // Whether the search engine selection dialog should be shown on first run. | 131 // Whether the search engine selection dialog should be shown on first run. |
| 136 static bool ShouldShowSearchEngineSelector(const TemplateURLService* model); | 132 static bool ShouldShowSearchEngineSelector(const TemplateURLService* model); |
| 137 | 133 |
| 138 // -- Platform-specific functions -- | 134 // -- Platform-specific functions -- |
| 139 | 135 |
| 140 // Imports settings. This may be done in a separate process depending on the | 136 // Imports settings. This may be done in a separate process depending on the |
| 141 // platform, but it will always block until done. The return value indicates | 137 // platform, but it will always block until done. The return value indicates |
| 142 // success. | 138 // success. |
| 143 static bool ImportSettings(Profile* profile, | 139 static bool ImportSettings(Profile* profile, |
| 144 scoped_refptr<ImporterHost> importer_host, | 140 scoped_refptr<ImporterHost> importer_host, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 }; | 204 }; |
| 209 | 205 |
| 210 // This variable should only be accessed through IsChromeFirstRun(). | 206 // This variable should only be accessed through IsChromeFirstRun(). |
| 211 static FirstRunState first_run_; | 207 static FirstRunState first_run_; |
| 212 | 208 |
| 213 // This class is for scoping purposes. | 209 // This class is for scoping purposes. |
| 214 DISALLOW_IMPLICIT_CONSTRUCTORS(FirstRun); | 210 DISALLOW_IMPLICIT_CONSTRUCTORS(FirstRun); |
| 215 }; | 211 }; |
| 216 | 212 |
| 217 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 213 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |