| 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 <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // Sets the kShouldShowWelcomePage local state pref so that the browser | 125 // Sets the kShouldShowWelcomePage local state pref so that the browser |
| 126 // loads the welcome tab once the message loop gets going. Returns false | 126 // loads the welcome tab once the message loop gets going. Returns false |
| 127 // if the pref could not be set. | 127 // if the pref could not be set. |
| 128 static bool SetShowWelcomePagePref(); | 128 static bool SetShowWelcomePagePref(); |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 friend class FirstRunTest; | 131 friend class FirstRunTest; |
| 132 | 132 |
| 133 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
| 134 // Imports settings in a separate process. It is the implementation of the | 134 // Imports settings in a separate process. It is the implementation of the |
| 135 // public version. | 135 // public version. |skip_first_run_ui| is true if no first run UI should |
| 136 // appear (search engine dialog, Firefox import warning dialog). |
| 136 static bool ImportSettings(Profile* profile, int browser_type, | 137 static bool ImportSettings(Profile* profile, int browser_type, |
| 137 int items_to_import, | 138 int items_to_import, |
| 138 const FilePath& import_path, | 139 const FilePath& import_path, |
| 140 bool skip_first_run_ui, |
| 139 gfx::NativeView parent_window); | 141 gfx::NativeView parent_window); |
| 140 // Import browser items in this process. The browser and the items to | 142 // Import browser items in this process. The browser and the items to |
| 141 // import are encoded int the command line. | 143 // import are encoded int the command line. |
| 142 static int ImportFromBrowser(Profile* profile, const CommandLine& cmdline); | 144 static int ImportFromBrowser(Profile* profile, const CommandLine& cmdline); |
| 143 #elif defined(OS_LINUX) | 145 #elif defined(OS_LINUX) |
| 144 static bool ImportBookmarks(const FilePath& import_bookmarks_path); | 146 static bool ImportBookmarks(const FilePath& import_bookmarks_path); |
| 145 #endif | 147 #endif |
| 146 | 148 |
| 147 // Import bookmarks from an html file. The path to the file is provided in | 149 // Import bookmarks from an html file. The path to the file is provided in |
| 148 // the command line. | 150 // the command line. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // or closed the dialog. | 291 // or closed the dialog. |
| 290 bool OpenFirstRunDialog(Profile* profile, | 292 bool OpenFirstRunDialog(Profile* profile, |
| 291 bool homepage_defined, | 293 bool homepage_defined, |
| 292 int import_items, | 294 int import_items, |
| 293 int dont_import_items, | 295 int dont_import_items, |
| 294 bool search_engine_experiment, | 296 bool search_engine_experiment, |
| 295 bool randomize_search_engine_experiment, | 297 bool randomize_search_engine_experiment, |
| 296 ProcessSingleton* process_singleton); | 298 ProcessSingleton* process_singleton); |
| 297 | 299 |
| 298 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 300 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |