| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // Get any extra arguments set with SetExtraArgumentsForImportProcess. | 128 // Get any extra arguments set with SetExtraArgumentsForImportProcess. |
| 130 const CommandLine& GetExtraArgumentsForImportProcess(); | 129 const CommandLine& GetExtraArgumentsForImportProcess(); |
| 131 | 130 |
| 132 // -- Platform-specific functions -- | 131 // -- Platform-specific functions -- |
| 133 | 132 |
| 134 // Automatically import history and home page (and search engine, if | 133 // Automatically import history and home page (and search engine, if |
| 135 // ShouldShowSearchEngineDialog is true). | 134 // ShouldShowSearchEngineDialog is true). |
| 136 void AutoImport(Profile* profile, | 135 void AutoImport(Profile* profile, |
| 137 bool homepage_defined, | 136 bool homepage_defined, |
| 138 int import_items, | 137 int import_items, |
| 139 int dont_import_items, | 138 int dont_import_items); |
| 140 ProcessSingleton* process_singleton); | |
| 141 | 139 |
| 142 // Does remaining first run tasks for |profile| and makes Chrome default browser | 140 // Does remaining first run tasks for |profile| and makes Chrome default browser |
| 143 // if |make_chrome_default|. This can pop the first run consent dialog on linux. | 141 // if |make_chrome_default|. This can pop the first run consent dialog on linux. |
| 144 void DoPostImportTasks(Profile* profile, bool make_chrome_default); | 142 void DoPostImportTasks(Profile* profile, bool make_chrome_default); |
| 145 | 143 |
| 146 // Whether a first-run import was triggered before the browser mainloop began. | 144 // Whether a first-run import was triggered before the browser mainloop began. |
| 147 // This is used in testing to verify import startup actions that occur before | 145 // This is used in testing to verify import startup actions that occur before |
| 148 // an observer can be registered in the test. | 146 // an observer can be registered in the test. |
| 149 bool DidPerformProfileImport(bool* exited_successfully); | 147 bool DidPerformProfileImport(bool* exited_successfully); |
| 150 | 148 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 const content::NotificationDetails& details) OVERRIDE; | 193 const content::NotificationDetails& details) OVERRIDE; |
| 196 | 194 |
| 197 content::NotificationRegistrar registrar_; | 195 content::NotificationRegistrar registrar_; |
| 198 | 196 |
| 199 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); | 197 DISALLOW_COPY_AND_ASSIGN(FirstRunBubbleLauncher); |
| 200 }; | 198 }; |
| 201 | 199 |
| 202 } // namespace first_run | 200 } // namespace first_run |
| 203 | 201 |
| 204 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ | 202 #endif // CHROME_BROWSER_FIRST_RUN_FIRST_RUN_H_ |
| OLD | NEW |