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 |
(...skipping 13 matching lines...) Expand all Loading... |
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 FIRST_RUN_CANCEL, // This shouldn't be considered first run but the sentinel | 27 FIRST_RUN_CANCEL, // This shouldn't be considered first run but the sentinel |
28 // should be created anyways. | 28 // should be created anyways. |
29 }; | 29 }; |
30 | 30 |
31 // This variable should only be accessed through IsChromeFirstRun(). | 31 // This variable should only be accessed through IsChromeFirstRun(). |
32 extern FirstRunState first_run_; | 32 extern FirstRunState first_run_; |
33 | 33 |
34 // Generates an initial user preference file in |user_data_dir| using the data | |
35 // in |master_prefs|. | |
36 bool GeneratePrefFile(const base::FilePath& user_data_dir, | |
37 const installer::MasterPreferences& master_prefs); | |
38 | |
39 // Sets up master preferences by preferences passed by installer. | 34 // Sets up master preferences by preferences passed by installer. |
40 void SetupMasterPrefsFromInstallPrefs( | 35 void SetupMasterPrefsFromInstallPrefs( |
41 const installer::MasterPreferences& install_prefs, | 36 const installer::MasterPreferences& install_prefs, |
42 MasterPrefs* out_prefs); | 37 MasterPrefs* out_prefs); |
43 | 38 |
44 // Creates the sentinel file that signals that chrome has been configured. | 39 // Creates the sentinel file that signals that chrome has been configured. |
45 bool CreateSentinel(); | 40 bool CreateSentinel(); |
46 | 41 |
47 // -- Platform-specific functions -- | 42 // -- Platform-specific functions -- |
48 | 43 |
(...skipping 13 matching lines...) Expand all Loading... |
62 // should exit. | 57 // should exit. |
63 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); | 58 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); |
64 | 59 |
65 // Returns the path for the master preferences file. | 60 // Returns the path for the master preferences file. |
66 base::FilePath MasterPrefsPath(); | 61 base::FilePath MasterPrefsPath(); |
67 | 62 |
68 } // namespace internal | 63 } // namespace internal |
69 } // namespace first_run | 64 } // namespace first_run |
70 | 65 |
71 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ | 66 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ |
OLD | NEW |