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_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 ~MasterPrefs(); | 64 ~MasterPrefs(); |
65 | 65 |
66 int ping_delay; | 66 int ping_delay; |
67 bool homepage_defined; | 67 bool homepage_defined; |
68 int do_import_items; | 68 int do_import_items; |
69 int dont_import_items; | 69 int dont_import_items; |
70 bool make_chrome_default; | 70 bool make_chrome_default; |
71 bool suppress_first_run_default_browser_prompt; | 71 bool suppress_first_run_default_browser_prompt; |
72 std::vector<GURL> new_tabs; | 72 std::vector<GURL> new_tabs; |
73 std::vector<GURL> bookmarks; | 73 std::vector<GURL> bookmarks; |
| 74 std::string import_bookmarks_path; |
74 std::string variations_seed; | 75 std::string variations_seed; |
75 }; | 76 }; |
76 | 77 |
77 // Returns true if this is the first time chrome is run for this user. | 78 // Returns true if this is the first time chrome is run for this user. |
78 bool IsChromeFirstRun(); | 79 bool IsChromeFirstRun(); |
79 | 80 |
80 // Creates the sentinel file that signals that chrome has been configured. | 81 // Creates the sentinel file that signals that chrome has been configured. |
81 bool CreateSentinel(); | 82 bool CreateSentinel(); |
82 | 83 |
83 // Get RLZ ping delay pref name. | 84 // Get RLZ ping delay pref name. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // This is used in testing to verify import startup actions that occur before | 148 // This is used in testing to verify import startup actions that occur before |
148 // an observer can be registered in the test. | 149 // an observer can be registered in the test. |
149 bool DidPerformProfileImport(bool* exited_successfully); | 150 bool DidPerformProfileImport(bool* exited_successfully); |
150 | 151 |
151 // Imports bookmarks and/or browser items (depending on platform support) | 152 // Imports bookmarks and/or browser items (depending on platform support) |
152 // in this process. This function is paired with first_run::ImportSettings(). | 153 // in this process. This function is paired with first_run::ImportSettings(). |
153 // This function might or might not show a visible UI depending on the | 154 // This function might or might not show a visible UI depending on the |
154 // cmdline parameters. | 155 // cmdline parameters. |
155 int ImportNow(Profile* profile, const CommandLine& cmdline); | 156 int ImportNow(Profile* profile, const CommandLine& cmdline); |
156 | 157 |
| 158 // Launches an import process to do initial import work before the profile is |
| 159 // created and first_run::AutoImport() is called. On Windows this entirely |
| 160 // replaces first_run::AutoImport(). |
| 161 // TODO(gab): Merge all of these tasks into first_run::AutoImport(). |
| 162 void LaunchInitialImport(MasterPrefs* out_prefs); |
| 163 |
157 // Returns the path for the master preferences file. | 164 // Returns the path for the master preferences file. |
158 base::FilePath MasterPrefsPath(); | 165 base::FilePath MasterPrefsPath(); |
159 | 166 |
160 // Set a master preferences file path that overrides platform defaults. | 167 // Set a master preferences file path that overrides platform defaults. |
161 void SetMasterPrefsPathForTesting(const base::FilePath& master_prefs); | 168 void SetMasterPrefsPathForTesting(const base::FilePath& master_prefs); |
162 | 169 |
163 // The master preferences is a JSON file with the same entries as the | 170 // The master preferences is a JSON file with the same entries as the |
164 // 'Default\Preferences' file. This function locates this file from a standard | 171 // 'Default\Preferences' file. This function locates this file from a standard |
165 // location and processes it so it becomes the default preferences in the | 172 // location and processes it so it becomes the default preferences in the |
166 // profile pointed to by |user_data_dir|. After processing the file, the | 173 // profile pointed to by |user_data_dir|. After processing the file, the |
(...skipping 28 matching lines...) Expand all Loading... |
195 const content::NotificationDetails& details) OVERRIDE; | 202 const content::NotificationDetails& details) OVERRIDE; |
196 | 203 |
197 content::NotificationRegistrar registrar_; | 204 content::NotificationRegistrar registrar_; |
198 | 205 |
199 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); | 206 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); |
200 }; | 207 }; |
201 | 208 |
202 } // namespace first_run | 209 } // namespace first_run |
203 | 210 |
204 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 211 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
OLD | NEW |