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 16 matching lines...) Expand all Loading... |
27 }; | 27 }; |
28 | 28 |
29 // This variable should only be accessed through IsChromeFirstRun(). | 29 // This variable should only be accessed through IsChromeFirstRun(). |
30 extern FirstRunState first_run_; | 30 extern FirstRunState first_run_; |
31 | 31 |
32 // Sets up master preferences by preferences passed by installer. | 32 // Sets up master preferences by preferences passed by installer. |
33 void SetupMasterPrefsFromInstallPrefs( | 33 void SetupMasterPrefsFromInstallPrefs( |
34 const installer::MasterPreferences& install_prefs, | 34 const installer::MasterPreferences& install_prefs, |
35 MasterPrefs* out_prefs); | 35 MasterPrefs* out_prefs); |
36 | 36 |
37 // Creates the sentinel file that signals that chrome has been configured. | 37 // Get the file path of the first run sentinel; returns false on failure. |
| 38 bool GetFirstRunSentinelFilePath(base::FilePath* path); |
| 39 |
| 40 // Create the first run sentinel file; returns false on failure. |
38 bool CreateSentinel(); | 41 bool CreateSentinel(); |
39 | 42 |
40 // -- Platform-specific functions -- | 43 // -- Platform-specific functions -- |
41 | 44 |
42 void DoPostImportPlatformSpecificTasks(Profile* profile); | 45 void DoPostImportPlatformSpecificTasks(Profile* profile); |
43 | 46 |
44 // Gives the full path to the sentinel file. The file might not exist. | 47 // Returns true if the sentinel file exists (or the path cannot be obtained). |
45 // This function has a common implementation on OS_POSIX and a windows specific | 48 // Migrates Windows legacy sentinel files to the corrent location, if needed. |
46 // implementation. | 49 bool IsFirstRunSentinelPresent(); |
47 bool GetFirstRunSentinelFilePath(base::FilePath* path); | |
48 | |
49 // Populates |path| with the old path to first run sentinel for the current | |
50 // configuration. Returns true if there is a legacy path for this configuration | |
51 // and it could be obtained. | |
52 bool GetLegacyFirstRunSentinelFilePath(base::FilePath* path); | |
53 | 50 |
54 // This function has a common implementationin for all non-linux platforms, and | 51 // This function has a common implementationin for all non-linux platforms, and |
55 // a linux specific implementation. | 52 // a linux specific implementation. |
56 bool IsOrganicFirstRun(); | 53 bool IsOrganicFirstRun(); |
57 | 54 |
58 // Shows the EULA dialog if required. Returns true if the EULA is accepted, | 55 // Shows the EULA dialog if required. Returns true if the EULA is accepted, |
59 // returns false if the EULA has not been accepted, in which case the browser | 56 // returns false if the EULA has not been accepted, in which case the browser |
60 // should exit. | 57 // should exit. |
61 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); | 58 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); |
62 | 59 |
63 // Returns the path for the master preferences file. | 60 // Returns the path for the master preferences file. |
64 base::FilePath MasterPrefsPath(); | 61 base::FilePath MasterPrefsPath(); |
65 | 62 |
66 } // namespace internal | 63 } // namespace internal |
67 } // namespace first_run | 64 } // namespace first_run |
68 | 65 |
69 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ | 66 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ |
OLD | NEW |