| 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 27 matching lines...) Expand all Loading... |
| 38 MINIMAL_BUBBLE // Minimal bubble shown after search engine dialog | 38 MINIMAL_BUBBLE // 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( | 71 static void AutoImport( |
| 71 Profile* profile, | 72 Profile* profile, |
| 72 bool homepage_defined, | 73 bool homepage_defined, |
| 73 int import_items, | 74 int import_items, |
| 74 int dont_import_items, | 75 int dont_import_items, |
| 75 bool search_engine_experiment, | 76 bool search_engine_experiment, |
| 76 bool randomize_search_engine_experiment, | 77 bool randomize_search_engine_experiment, |
| 78 bool make_chrome_default, |
| 77 ProcessSingleton* process_singleton); | 79 ProcessSingleton* process_singleton); |
| 78 | 80 |
| 79 // Does platform specific setup. Called at the start of AutoImport. | 81 // Does platform specific setup. Called at the start of AutoImport. |
| 80 static void PlatformSetup(); | 82 static void PlatformSetup(); |
| 81 | 83 |
| 82 // Returns whether the current install is "organic". | 84 // Returns whether the current install is "organic". |
| 83 static bool IsOrganic(); | 85 static bool IsOrganic(); |
| 84 | 86 |
| 85 // Shows the search engine choice dialog, and any other platform dialogs. | 87 // Shows the search engine choice dialog, and any other platform dialogs. |
| 86 // Only called in "organic" installs. | 88 // Only called in "organic" installs. |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // or closed the dialog. | 326 // or closed the dialog. |
| 325 bool OpenFirstRunDialog(Profile* profile, | 327 bool OpenFirstRunDialog(Profile* profile, |
| 326 bool homepage_defined, | 328 bool homepage_defined, |
| 327 int import_items, | 329 int import_items, |
| 328 int dont_import_items, | 330 int dont_import_items, |
| 329 bool search_engine_experiment, | 331 bool search_engine_experiment, |
| 330 bool randomize_search_engine_experiment, | 332 bool randomize_search_engine_experiment, |
| 331 ProcessSingleton* process_singleton); | 333 ProcessSingleton* process_singleton); |
| 332 | 334 |
| 333 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 335 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |