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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_
6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_
16 class MasterPreferences
;
24 FIRST_RUN_UNKNOWN
, // The state is not tested or set yet.
29 // Sets up master preferences by preferences passed by installer.
30 void SetupMasterPrefsFromInstallPrefs(
31 const installer::MasterPreferences
& install_prefs
,
32 MasterPrefs
* out_prefs
);
34 // Get the file path of the first run sentinel; returns false on failure.
35 bool GetFirstRunSentinelFilePath(base::FilePath
* path
);
37 // Create the first run sentinel file; returns false on failure.
38 bool CreateSentinel();
40 // -- Platform-specific functions --
42 void DoPostImportPlatformSpecificTasks(Profile
* profile
);
44 // Returns true if the sentinel file exists (or the path cannot be obtained).
45 // Migrates Windows legacy sentinel files to the corrent location, if needed.
46 bool IsFirstRunSentinelPresent();
48 // This function has a common implementationin for all non-linux platforms, and
49 // a linux specific implementation.
50 bool IsOrganicFirstRun();
52 // Shows the EULA dialog if required. Returns true if the EULA is accepted,
53 // returns false if the EULA has not been accepted, in which case the browser
55 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences
* install_prefs
);
57 // Returns the path for the master preferences file.
58 base::FilePath
MasterPrefsPath();
60 } // namespace internal
61 } // namespace first_run
63 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_