| 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 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 #include "ui/gfx/native_widget_types.h" | 17 #include "ui/gfx/native_widget_types.h" |
| 18 | 18 |
| 19 class CommandLine; | 19 class CommandLine; |
| 20 class GURL; | 20 class GURL; |
| 21 class PrefRegistrySyncable; | 21 class PrefRegistrySyncable; |
| 22 class Profile; | 22 class Profile; |
| 23 class ProcessSingleton; | |
| 24 | 23 |
| 25 namespace base { | 24 namespace base { |
| 26 class FilePath; | 25 class FilePath; |
| 27 } | 26 } |
| 28 | 27 |
| 29 // This namespace contains the chrome first-run installation actions needed to | 28 // This namespace contains the chrome first-run installation actions needed to |
| 30 // fully test the custom installer. It also contains the opposite actions to | 29 // fully test the custom installer. It also contains the opposite actions to |
| 31 // execute during uninstall. When the first run UI is ready we won't | 30 // execute during uninstall. When the first run UI is ready we won't |
| 32 // do the actions unconditionally. Currently the only action is to create a | 31 // do the actions unconditionally. Currently the only action is to create a |
| 33 // desktop shortcut. | 32 // desktop shortcut. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // Get any extra arguments set with SetExtraArgumentsForImportProcess. | 133 // Get any extra arguments set with SetExtraArgumentsForImportProcess. |
| 135 const CommandLine& GetExtraArgumentsForImportProcess(); | 134 const CommandLine& GetExtraArgumentsForImportProcess(); |
| 136 | 135 |
| 137 // -- Platform-specific functions -- | 136 // -- Platform-specific functions -- |
| 138 | 137 |
| 139 // Automatically import history and home page (and search engine, if | 138 // Automatically import history and home page (and search engine, if |
| 140 // ShouldShowSearchEngineDialog is true). | 139 // ShouldShowSearchEngineDialog is true). |
| 141 void AutoImport(Profile* profile, | 140 void AutoImport(Profile* profile, |
| 142 bool homepage_defined, | 141 bool homepage_defined, |
| 143 int import_items, | 142 int import_items, |
| 144 int dont_import_items, | 143 int dont_import_items); |
| 145 ProcessSingleton* process_singleton); | |
| 146 | 144 |
| 147 // Does remaining first run tasks for |profile| and makes Chrome default browser | 145 // Does remaining first run tasks for |profile| and makes Chrome default browser |
| 148 // if |make_chrome_default|. This can pop the first run consent dialog on linux. | 146 // if |make_chrome_default|. This can pop the first run consent dialog on linux. |
| 149 void DoPostImportTasks(Profile* profile, bool make_chrome_default); | 147 void DoPostImportTasks(Profile* profile, bool make_chrome_default); |
| 150 | 148 |
| 151 // Whether a first-run import was triggered before the browser mainloop began. | 149 // Whether a first-run import was triggered before the browser mainloop began. |
| 152 // This is used in testing to verify import startup actions that occur before | 150 // This is used in testing to verify import startup actions that occur before |
| 153 // an observer can be registered in the test. | 151 // an observer can be registered in the test. |
| 154 bool DidPerformProfileImport(bool* exited_successfully); | 152 bool DidPerformProfileImport(bool* exited_successfully); |
| 155 | 153 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 const content::NotificationDetails& details) OVERRIDE; | 198 const content::NotificationDetails& details) OVERRIDE; |
| 201 | 199 |
| 202 content::NotificationRegistrar registrar_; | 200 content::NotificationRegistrar registrar_; |
| 203 | 201 |
| 204 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); | 202 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); |
| 205 }; | 203 }; |
| 206 | 204 |
| 207 } // namespace first_run | 205 } // namespace first_run |
| 208 | 206 |
| 209 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 207 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |