[Media Router] Add integration tests and e2e tests for media router and presentation...
[chromium-blink-merge.git] / chrome / browser / first_run / first_run_internal.h
blobdf78416a86affe7f96347237c1599716d419269c
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_
8 class MasterPrefs;
9 class Profile;
11 namespace base {
12 class FilePath;
15 namespace installer {
16 class MasterPreferences;
19 namespace first_run {
21 namespace internal {
23 enum FirstRunState {
24 FIRST_RUN_UNKNOWN, // The state is not tested or set yet.
25 FIRST_RUN_TRUE,
26 FIRST_RUN_FALSE,
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
54 // should exit.
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_