| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Options for the first run bubble. The default is FIRST_RUN_BUBBLE_DONT_SHOW. | 43 // Options for the first run bubble. The default is FIRST_RUN_BUBBLE_DONT_SHOW. |
| 44 // FIRST_RUN_BUBBLE_SUPPRESS is stronger in that FIRST_RUN_BUBBLE_SHOW should | 44 // FIRST_RUN_BUBBLE_SUPPRESS is stronger in that FIRST_RUN_BUBBLE_SHOW should |
| 45 // never be set once FIRST_RUN_BUBBLE_SUPPRESS is set. | 45 // never be set once FIRST_RUN_BUBBLE_SUPPRESS is set. |
| 46 enum FirstRunBubbleOptions { | 46 enum FirstRunBubbleOptions { |
| 47 FIRST_RUN_BUBBLE_DONT_SHOW, | 47 FIRST_RUN_BUBBLE_DONT_SHOW, |
| 48 FIRST_RUN_BUBBLE_SUPPRESS, | 48 FIRST_RUN_BUBBLE_SUPPRESS, |
| 49 FIRST_RUN_BUBBLE_SHOW, | 49 FIRST_RUN_BUBBLE_SHOW, |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 enum ProcessMasterPreferencesResult { | 52 enum ProcessMasterPreferencesResult { |
| 53 SHOW_FIRST_RUN = 0, // Should show the first run flow. | 53 DO_FIRST_RUN_TASKS = 0, // Should do the first run tasks. |
| 54 SKIP_FIRST_RUN, // Should skip the first run flow. | 54 SKIP_FIRST_RUN_TASKS, // Should skip the first run tasks. |
| 55 EULA_EXIT_NOW, // Should immediately exit due to EULA flow. | 55 EULA_EXIT_NOW, // Should immediately exit due to EULA flow. |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // See ProcessMasterPreferences for more info about this structure. | 58 // See ProcessMasterPreferences for more info about this structure. |
| 59 struct MasterPrefs { | 59 struct MasterPrefs { |
| 60 MasterPrefs(); | 60 MasterPrefs(); |
| 61 ~MasterPrefs(); | 61 ~MasterPrefs(); |
| 62 | 62 |
| 63 int ping_delay; | 63 int ping_delay; |
| 64 bool homepage_defined; | 64 bool homepage_defined; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 // Automatically import history and home page (and search engine, if | 117 // Automatically import history and home page (and search engine, if |
| 118 // ShouldShowSearchEngineDialog is true). | 118 // ShouldShowSearchEngineDialog is true). |
| 119 void AutoImport(Profile* profile, | 119 void AutoImport(Profile* profile, |
| 120 bool homepage_defined, | 120 bool homepage_defined, |
| 121 int import_items, | 121 int import_items, |
| 122 int dont_import_items, | 122 int dont_import_items, |
| 123 ProcessSingleton* process_singleton); | 123 ProcessSingleton* process_singleton); |
| 124 | 124 |
| 125 // Does remaining first run tasks for |profile| and makes Chrome default browser | 125 // Does remaining first run tasks for |profile| and makes Chrome default browser |
| 126 // if |make_chrome_default|. | 126 // if |make_chrome_default|. |
| 127 void DoFirstRunTasks(Profile* profile, bool make_chrome_default); | 127 void DoPostImportTasks(Profile* profile, bool make_chrome_default); |
| 128 | 128 |
| 129 // Imports bookmarks and/or browser items (depending on platform support) | 129 // Imports bookmarks and/or browser items (depending on platform support) |
| 130 // in this process. This function is paired with first_run::ImportSettings(). | 130 // in this process. This function is paired with first_run::ImportSettings(). |
| 131 // This function might or might not show a visible UI depending on the | 131 // This function might or might not show a visible UI depending on the |
| 132 // cmdline parameters. | 132 // cmdline parameters. |
| 133 int ImportNow(Profile* profile, const CommandLine& cmdline); | 133 int ImportNow(Profile* profile, const CommandLine& cmdline); |
| 134 | 134 |
| 135 // Returns the path for the master preferences file. | 135 // Returns the path for the master preferences file. |
| 136 FilePath MasterPrefsPath(); | 136 FilePath MasterPrefsPath(); |
| 137 | 137 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 const content::NotificationDetails& details) OVERRIDE; | 170 const content::NotificationDetails& details) OVERRIDE; |
| 171 | 171 |
| 172 content::NotificationRegistrar registrar_; | 172 content::NotificationRegistrar registrar_; |
| 173 | 173 |
| 174 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); | 174 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 } // namespace first_run | 177 } // namespace first_run |
| 178 | 178 |
| 179 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 179 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |