| 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_INTERNAL_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ |
| 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ |
| 7 | 7 |
| 8 class MasterPrefs; | 8 class MasterPrefs; |
| 9 class Profile; | 9 class Profile; |
| 10 | 10 |
| 11 namespace base { | 11 namespace base { |
| 12 class FilePath; | 12 class FilePath; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace installer { | 15 namespace installer { |
| 16 class MasterPreferences; | 16 class MasterPreferences; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace first_run { | 19 namespace first_run { |
| 20 | 20 |
| 21 namespace internal { | 21 namespace internal { |
| 22 | 22 |
| 23 enum FirstRunState { | 23 enum FirstRunState { |
| 24 FIRST_RUN_UNKNOWN, // The state is not tested or set yet. | 24 FIRST_RUN_UNKNOWN, // The state is not tested or set yet. |
| 25 FIRST_RUN_TRUE, | 25 FIRST_RUN_TRUE, |
| 26 FIRST_RUN_FALSE, | 26 FIRST_RUN_FALSE, |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 // This variable should only be accessed through IsChromeFirstRun(). | |
| 30 extern FirstRunState first_run_; | |
| 31 | |
| 32 // Sets up master preferences by preferences passed by installer. | 29 // Sets up master preferences by preferences passed by installer. |
| 33 void SetupMasterPrefsFromInstallPrefs( | 30 void SetupMasterPrefsFromInstallPrefs( |
| 34 const installer::MasterPreferences& install_prefs, | 31 const installer::MasterPreferences& install_prefs, |
| 35 MasterPrefs* out_prefs); | 32 MasterPrefs* out_prefs); |
| 36 | 33 |
| 37 // Get the file path of the first run sentinel; returns false on failure. | 34 // Get the file path of the first run sentinel; returns false on failure. |
| 38 bool GetFirstRunSentinelFilePath(base::FilePath* path); | 35 bool GetFirstRunSentinelFilePath(base::FilePath* path); |
| 39 | 36 |
| 40 // Create the first run sentinel file; returns false on failure. | 37 // Create the first run sentinel file; returns false on failure. |
| 41 bool CreateSentinel(); | 38 bool CreateSentinel(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 57 // should exit. | 54 // should exit. |
| 58 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); | 55 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); |
| 59 | 56 |
| 60 // Returns the path for the master preferences file. | 57 // Returns the path for the master preferences file. |
| 61 base::FilePath MasterPrefsPath(); | 58 base::FilePath MasterPrefsPath(); |
| 62 | 59 |
| 63 } // namespace internal | 60 } // namespace internal |
| 64 } // namespace first_run | 61 } // namespace first_run |
| 65 | 62 |
| 66 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ | 63 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ |
| OLD | NEW |