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 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace base { | 26 namespace base { |
27 class FilePath; | 27 class FilePath; |
28 } | 28 } |
29 | 29 |
30 namespace installer { | 30 namespace installer { |
31 class MasterPreferences; | 31 class MasterPreferences; |
32 } | 32 } |
33 | 33 |
34 namespace first_run { | 34 namespace first_run { |
| 35 |
35 namespace internal { | 36 namespace internal { |
36 | 37 |
37 enum FirstRunState { | 38 enum FirstRunState { |
38 FIRST_RUN_UNKNOWN, // The state is not tested or set yet. | 39 FIRST_RUN_UNKNOWN, // The state is not tested or set yet. |
39 FIRST_RUN_TRUE, | 40 FIRST_RUN_TRUE, |
40 FIRST_RUN_FALSE | 41 FIRST_RUN_FALSE |
41 }; | 42 }; |
42 | 43 |
43 // This variable should only be accessed through IsChromeFirstRun(). | 44 // This variable should only be accessed through IsChromeFirstRun(). |
44 extern FirstRunState first_run_; | 45 extern FirstRunState first_run_; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 bool CopyPrefFile(const base::FilePath& user_data_dir, | 90 bool CopyPrefFile(const base::FilePath& user_data_dir, |
90 const base::FilePath& master_prefs_path); | 91 const base::FilePath& master_prefs_path); |
91 | 92 |
92 // Sets up master preferences by preferences passed by installer. | 93 // Sets up master preferences by preferences passed by installer. |
93 void SetupMasterPrefsFromInstallPrefs( | 94 void SetupMasterPrefsFromInstallPrefs( |
94 const installer::MasterPreferences& install_prefs, | 95 const installer::MasterPreferences& install_prefs, |
95 MasterPrefs* out_prefs); | 96 MasterPrefs* out_prefs); |
96 | 97 |
97 void SetDefaultBrowser(installer::MasterPreferences* install_prefs); | 98 void SetDefaultBrowser(installer::MasterPreferences* install_prefs); |
98 | 99 |
99 // Sets ping_delay. | |
100 void SetRLZPref(first_run::MasterPrefs* out_prefs, | |
101 installer::MasterPreferences* install_prefs); | |
102 | |
103 // -- Platform-specific functions -- | 100 // -- Platform-specific functions -- |
104 | 101 |
105 void DoPostImportPlatformSpecificTasks(); | 102 void DoPostImportPlatformSpecificTasks(); |
106 | 103 |
107 // Gives the full path to the sentinel file. The file might not exist. | 104 // Gives the full path to the sentinel file. The file might not exist. |
108 // This function has a common implementation on OS_POSIX and a windows specific | 105 // This function has a common implementation on OS_POSIX and a windows specific |
109 // implementation. | 106 // implementation. |
110 bool GetFirstRunSentinelFilePath(base::FilePath* path); | 107 bool GetFirstRunSentinelFilePath(base::FilePath* path); |
111 | 108 |
112 // This function has a common implementationin for all non-linux platforms, and | 109 // This function has a common implementationin for all non-linux platforms, and |
(...skipping 20 matching lines...) Expand all Loading... |
133 | 130 |
134 #if !defined(OS_WIN) | 131 #if !defined(OS_WIN) |
135 bool ImportBookmarks(const base::FilePath& import_bookmarks_path); | 132 bool ImportBookmarks(const base::FilePath& import_bookmarks_path); |
136 #endif | 133 #endif |
137 | 134 |
138 // Shows the EULA dialog if required. Returns true if the EULA is accepted, | 135 // Shows the EULA dialog if required. Returns true if the EULA is accepted, |
139 // returns false if the EULA has not been accepted, in which case the browser | 136 // returns false if the EULA has not been accepted, in which case the browser |
140 // should exit. | 137 // should exit. |
141 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); | 138 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); |
142 | 139 |
| 140 // Returns the path for the master preferences file. |
| 141 base::FilePath MasterPrefsPath(); |
| 142 |
143 } // namespace internal | 143 } // namespace internal |
144 } // namespace first_run | 144 } // namespace first_run |
145 | 145 |
146 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ | 146 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ |
OLD | NEW |