| 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_H_ | 5 #ifndef CHROME_BROWSER_FIRST_RUN_H_ |
| 6 #define CHROME_BROWSER_FIRST_RUN_H_ | 6 #define CHROME_BROWSER_FIRST_RUN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 MINIMALBUBBLE // Minimal bubble shown after search engine dialog | 38 MINIMALBUBBLE // Minimal bubble shown after search engine dialog |
| 39 } BubbleType; | 39 } BubbleType; |
| 40 // See ProcessMasterPreferences for more info about this structure. | 40 // See ProcessMasterPreferences for more info about this structure. |
| 41 struct MasterPrefs { | 41 struct MasterPrefs { |
| 42 int ping_delay; | 42 int ping_delay; |
| 43 bool homepage_defined; | 43 bool homepage_defined; |
| 44 int do_import_items; | 44 int do_import_items; |
| 45 int dont_import_items; | 45 int dont_import_items; |
| 46 bool run_search_engine_experiment; | 46 bool run_search_engine_experiment; |
| 47 bool randomize_search_engine_experiment; | 47 bool randomize_search_engine_experiment; |
| 48 bool make_chrome_default; |
| 48 std::vector<GURL> new_tabs; | 49 std::vector<GURL> new_tabs; |
| 49 std::vector<GURL> bookmarks; | 50 std::vector<GURL> bookmarks; |
| 50 }; | 51 }; |
| 51 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
| 52 // Creates the desktop shortcut to chrome for the current user. Returns | 53 // Creates the desktop shortcut to chrome for the current user. Returns |
| 53 // false if it fails. It will overwrite the shortcut if it exists. | 54 // false if it fails. It will overwrite the shortcut if it exists. |
| 54 static bool CreateChromeDesktopShortcut(); | 55 static bool CreateChromeDesktopShortcut(); |
| 55 // Creates the quick launch shortcut to chrome for the current user. Returns | 56 // Creates the quick launch shortcut to chrome for the current user. Returns |
| 56 // false if it fails. It will overwrite the shortcut if it exists. | 57 // false if it fails. It will overwrite the shortcut if it exists. |
| 57 static bool CreateChromeQuickLaunchShortcut(); | 58 static bool CreateChromeQuickLaunchShortcut(); |
| 58 // Returns true if we are being run in a locale in which search experiments | 59 // Returns true if we are being run in a locale in which search experiments |
| 59 // are allowed. | 60 // are allowed. |
| 60 static bool InSearchExperimentLocale(); | 61 static bool InSearchExperimentLocale(); |
| 61 #endif // OS_WIN | 62 #endif // OS_WIN |
| 62 // Import bookmarks and/or browser items (depending on platform support) | 63 // Import bookmarks and/or browser items (depending on platform support) |
| 63 // in this process. This function is paired with FirstRun::ImportSettings(). | 64 // in this process. This function is paired with FirstRun::ImportSettings(). |
| 64 // This function might or might not show a visible UI depending on the | 65 // This function might or might not show a visible UI depending on the |
| 65 // cmdline parameters. | 66 // cmdline parameters. |
| 66 static int ImportNow(Profile* profile, const CommandLine& cmdline); | 67 static int ImportNow(Profile* profile, const CommandLine& cmdline); |
| 67 | 68 |
| 68 // Automatically import history and home page (and search engine, if | 69 // Automatically import history and home page (and search engine, if |
| 69 // nonorganic). | 70 // nonorganic). |
| 70 static void AutoImport(Profile* profile, | 71 static void AutoImport(Profile* profile, |
| 71 bool homepage_defined, | 72 bool homepage_defined, |
| 72 int import_items, | 73 int import_items, |
| 73 int dont_import_items, | 74 int dont_import_items, |
| 74 bool search_engine_experiment, | 75 bool search_engine_experiment, |
| 75 bool randomize_search_engine_experiment, | 76 bool randomize_search_engine_experiment, |
| 77 bool make_chrome_default, |
| 76 ProcessSingleton* process_singleton); | 78 ProcessSingleton* process_singleton); |
| 77 | 79 |
| 78 // The master preferences is a JSON file with the same entries as the | 80 // The master preferences is a JSON file with the same entries as the |
| 79 // 'Default\Preferences' file. This function locates this file from a standard | 81 // 'Default\Preferences' file. This function locates this file from a standard |
| 80 // location and processes it so it becomes the default preferences in the | 82 // location and processes it so it becomes the default preferences in the |
| 81 // profile pointed to by |user_data_dir|. After processing the file, the | 83 // profile pointed to by |user_data_dir|. After processing the file, the |
| 82 // function returns true if and only if showing the first run dialog is | 84 // function returns true if and only if showing the first run dialog is |
| 83 // needed. The detailed settings in the preference file are reported via | 85 // needed. The detailed settings in the preference file are reported via |
| 84 // |preference_details|. | 86 // |preference_details|. |
| 85 // | 87 // |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 // or closed the dialog. | 292 // or closed the dialog. |
| 291 bool OpenFirstRunDialog(Profile* profile, | 293 bool OpenFirstRunDialog(Profile* profile, |
| 292 bool homepage_defined, | 294 bool homepage_defined, |
| 293 int import_items, | 295 int import_items, |
| 294 int dont_import_items, | 296 int dont_import_items, |
| 295 bool search_engine_experiment, | 297 bool search_engine_experiment, |
| 296 bool randomize_search_engine_experiment, | 298 bool randomize_search_engine_experiment, |
| 297 ProcessSingleton* process_singleton); | 299 ProcessSingleton* process_singleton); |
| 298 | 300 |
| 299 #endif // CHROME_BROWSER_FIRST_RUN_H_ | 301 #endif // CHROME_BROWSER_FIRST_RUN_H_ |
| OLD | NEW |