Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(320)

Side by Side Diff: chrome/browser/first_run/first_run_internal.h

Issue 12463030: Do not do AutoImport on Windows since the import process is already ran earlier as part of ProcessM… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix posix compile Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/first_run/first_run_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 12 matching lines...) Expand all
23 23
24 namespace base { 24 namespace base {
25 class FilePath; 25 class FilePath;
26 } 26 }
27 27
28 namespace installer { 28 namespace installer {
29 class MasterPreferences; 29 class MasterPreferences;
30 } 30 }
31 31
32 namespace first_run { 32 namespace first_run {
33
33 namespace internal { 34 namespace internal {
34 35
36 // Flags indicating whether a first-run profile auto import was performed, and
37 // whether the importer process exited successfully.
38 extern bool g_did_perform_profile_import;
39 extern bool g_profile_import_exited_successfully;
40
35 enum FirstRunState { 41 enum FirstRunState {
36 FIRST_RUN_UNKNOWN, // The state is not tested or set yet. 42 FIRST_RUN_UNKNOWN, // The state is not tested or set yet.
37 FIRST_RUN_TRUE, 43 FIRST_RUN_TRUE,
38 FIRST_RUN_FALSE 44 FIRST_RUN_FALSE
39 }; 45 };
40 46
41 // This variable should only be accessed through IsChromeFirstRun(). 47 // This variable should only be accessed through IsChromeFirstRun().
42 extern FirstRunState first_run_; 48 extern FirstRunState first_run_;
43 49
44 // Loads master preferences from the master preference file into the installer 50 // Loads master preferences from the master preference file into the installer
(...skipping 12 matching lines...) Expand all
57 const installer::MasterPreferences& install_prefs, 63 const installer::MasterPreferences& install_prefs,
58 MasterPrefs* out_prefs); 64 MasterPrefs* out_prefs);
59 65
60 void SetDefaultBrowser(installer::MasterPreferences* install_prefs); 66 void SetDefaultBrowser(installer::MasterPreferences* install_prefs);
61 67
62 // Returns true if first run ui should be skipped, which is the case that 68 // Returns true if first run ui should be skipped, which is the case that
63 // skip_first_run_ui setting is set to true. In the case the setting is 69 // skip_first_run_ui setting is set to true. In the case the setting is
64 // not found or specified, it returns false by default. 70 // not found or specified, it returns false by default.
65 bool SkipFirstRunUI(installer::MasterPreferences* install_prefs); 71 bool SkipFirstRunUI(installer::MasterPreferences* install_prefs);
66 72
67 // Sets ping_delay. 73 // Imports settings. This may be done in a separate process depending on the
68 void SetRLZPref(first_run::MasterPrefs* out_prefs, 74 // platform, but it will always block until done. The return value indicates
69 installer::MasterPreferences* install_prefs); 75 // success.
76 // This functions has a common implementation for OS_POSIX, and a
77 // windows specific implementation.
78 bool ImportSettings(Profile* profile,
79 scoped_refptr<ImporterHost> importer_host,
80 scoped_refptr<ImporterList> importer_list,
81 int items_to_import);
70 82
71 // -- Platform-specific functions -- 83 // -- Platform-specific functions --
72 84
73 void DoPostImportPlatformSpecificTasks(); 85 void DoPostImportPlatformSpecificTasks();
74 86
75 // Gives the full path to the sentinel file. The file might not exist. 87 // Gives the full path to the sentinel file. The file might not exist.
76 // This function has a common implementation on OS_POSIX and a windows specific 88 // This function has a common implementation on OS_POSIX and a windows specific
77 // implementation. 89 // implementation.
78 bool GetFirstRunSentinelFilePath(base::FilePath* path); 90 bool GetFirstRunSentinelFilePath(base::FilePath* path);
79 91
80 // This function has a common implementationin for all non-linux platforms, and 92 // This function has a common implementationin for all non-linux platforms, and
81 // a linux specific implementation. 93 // a linux specific implementation.
82 bool IsOrganicFirstRun(); 94 bool IsOrganicFirstRun();
83 95
84 // Imports settings. This may be done in a separate process depending on the
85 // platform, but it will always block until done. The return value indicates
86 // success.
87 // This functions has a common implementation for OS_POSIX, and a
88 // windows specific implementation.
89 bool ImportSettings(Profile* profile,
90 scoped_refptr<ImporterHost> importer_host,
91 scoped_refptr<ImporterList> importer_list,
92 int items_to_import);
93
94 // Sets import preferences and launch the import process.
95 void SetImportPreferencesAndLaunchImport(
96 MasterPrefs* out_prefs,
97 installer::MasterPreferences* install_prefs);
98
99 int ImportBookmarkFromFileIfNeeded(Profile* profile, 96 int ImportBookmarkFromFileIfNeeded(Profile* profile,
100 const CommandLine& cmdline); 97 const CommandLine& cmdline);
101 98
102 #if !defined(OS_WIN) 99 #if !defined(OS_WIN)
103 bool ImportBookmarks(const base::FilePath& import_bookmarks_path); 100 bool ImportBookmarks(const base::FilePath& import_bookmarks_path);
104 #endif 101 #endif
105 102
106 // Shows the EULA dialog if required. Returns true if the EULA is accepted, 103 // Shows the EULA dialog if required. Returns true if the EULA is accepted,
107 // returns false if the EULA has not been accepted, in which case the browser 104 // returns false if the EULA has not been accepted, in which case the browser
108 // should exit. 105 // should exit.
109 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs); 106 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs);
110 107
111 } // namespace internal 108 } // namespace internal
112 } // namespace first_run 109 } // namespace first_run
113 110
114 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_ 111 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_INTERNAL_H_
OLDNEW
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/first_run/first_run_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698