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