OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // Sets the kShouldShowWelcomePage local state pref so that the browser | 124 // Sets the kShouldShowWelcomePage local state pref so that the browser |
125 // loads the welcome tab once the message loop gets going. Returns false | 125 // loads the welcome tab once the message loop gets going. Returns false |
126 // if the pref could not be set. | 126 // if the pref could not be set. |
127 static bool SetShowWelcomePagePref(); | 127 static bool SetShowWelcomePagePref(); |
128 | 128 |
129 private: | 129 private: |
130 friend class FirstRunTest; | 130 friend class FirstRunTest; |
131 FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); | 131 FRIEND_TEST_ALL_PREFIXES(Toolbar5ImporterTest, BookmarkParse); |
132 | 132 |
133 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
| 134 // Writes the EULA to a temporary file, returned in |*eula_path|, and returns |
| 135 // true if successful. |
| 136 static bool WriteEULAtoTempFile(FilePath* eula_path); |
| 137 // Launches the setup exe with the given parameter/value on the command-line, |
| 138 // waits for its termination, returns its exit code in |*ret_code|, and |
| 139 // returns true if the exit code is valid. |
| 140 static bool LaunchSetupWithParam(const std::string& param, |
| 141 const std::wstring& value, |
| 142 int* ret_code); |
| 143 // Installs a task to do an extensions update check once the extensions system |
| 144 // is running. |
| 145 static void DoDelayedInstallExtensions(); |
134 // Imports settings in a separate process. It is the implementation of the | 146 // Imports settings in a separate process. It is the implementation of the |
135 // public version. |skip_first_run_ui| is true if no first run UI should | 147 // public version. |skip_first_run_ui| is true if no first run UI should |
136 // appear (search engine dialog, Firefox import warning dialog). | 148 // appear (search engine dialog, Firefox import warning dialog). |
137 static bool ImportSettings(Profile* profile, int browser_type, | 149 static bool ImportSettings(Profile* profile, int browser_type, |
138 int items_to_import, | 150 int items_to_import, |
139 const FilePath& import_path, | 151 const FilePath& import_path, |
140 bool skip_first_run_ui, | 152 bool skip_first_run_ui, |
141 gfx::NativeView parent_window); | 153 gfx::NativeView parent_window); |
142 // Import browser items in this process. The browser and the items to | 154 // Import browser items in this process. The browser and the items to |
143 // import are encoded int the command line. | 155 // import are encoded int the command line. |
144 static int ImportFromBrowser(Profile* profile, const CommandLine& cmdline); | 156 static int ImportFromBrowser(Profile* profile, const CommandLine& cmdline); |
145 #elif defined(OS_LINUX) | 157 #else |
146 static bool ImportBookmarks(const FilePath& import_bookmarks_path); | 158 static bool ImportBookmarks(const FilePath& import_bookmarks_path); |
147 #endif | 159 #endif |
148 | 160 |
149 // Import bookmarks from an html file. The path to the file is provided in | 161 // Import bookmarks from an html file. The path to the file is provided in |
150 // the command line. | 162 // the command line. |
151 static int ImportFromFile(Profile* profile, const CommandLine& cmdline); | 163 static int ImportFromFile(Profile* profile, const CommandLine& cmdline); |
152 | 164 |
153 // Gives the full path to the sentinel file. The file might not exist. | 165 // Gives the full path to the sentinel file. The file might not exist. |
154 static bool GetFirstRunSentinelFilePath(FilePath* path); | 166 static bool GetFirstRunSentinelFilePath(FilePath* path); |
155 | 167 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 // or closed the dialog. | 311 // or closed the dialog. |
300 bool OpenFirstRunDialog(Profile* profile, | 312 bool OpenFirstRunDialog(Profile* profile, |
301 bool homepage_defined, | 313 bool homepage_defined, |
302 int import_items, | 314 int import_items, |
303 int dont_import_items, | 315 int dont_import_items, |
304 bool search_engine_experiment, | 316 bool search_engine_experiment, |
305 bool randomize_search_engine_experiment, | 317 bool randomize_search_engine_experiment, |
306 ProcessSingleton* process_singleton); | 318 ProcessSingleton* process_singleton); |
307 | 319 |
308 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 320 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
OLD | NEW |