| 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 #include "chrome/browser/first_run/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
| 6 | 6 |
| 7 #include <shlobj.h> | 7 #include <shlobj.h> |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/browser/extensions/extension_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
| 22 #include "chrome/browser/extensions/updater/extension_updater.h" | 22 #include "chrome/browser/extensions/updater/extension_updater.h" |
| 23 #include "chrome/browser/first_run/first_run_import_observer.h" | 23 #include "chrome/browser/first_run/first_run_import_observer.h" |
| 24 #include "chrome/browser/first_run/first_run_internal.h" | 24 #include "chrome/browser/first_run/first_run_internal.h" |
| 25 #include "chrome/browser/importer/importer_host.h" | 25 #include "chrome/browser/importer/importer_host.h" |
| 26 #include "chrome/browser/importer/importer_list.h" | 26 #include "chrome/browser/importer/importer_list.h" |
| 27 #include "chrome/browser/importer/importer_progress_dialog.h" | 27 #include "chrome/browser/importer/importer_progress_dialog.h" |
| 28 #include "chrome/browser/prefs/pref_service.h" | 28 #include "chrome/browser/prefs/pref_service.h" |
| 29 #include "chrome/browser/process_singleton.h" | 29 #include "chrome/browser/process_singleton.h" |
| 30 #include "chrome/browser/profiles/profile.h" | 30 #include "chrome/browser/profiles/profile.h" |
| 31 #include "chrome/browser/shell_integration.h" |
| 32 #include "chrome/browser/ui/startup/default_browser_prompt.h" |
| 31 #include "chrome/common/chrome_notification_types.h" | 33 #include "chrome/common/chrome_notification_types.h" |
| 32 #include "chrome/common/chrome_paths.h" | 34 #include "chrome/common/chrome_paths.h" |
| 33 #include "chrome/common/chrome_result_codes.h" | 35 #include "chrome/common/chrome_result_codes.h" |
| 34 #include "chrome/common/chrome_switches.h" | 36 #include "chrome/common/chrome_switches.h" |
| 35 #include "chrome/common/pref_names.h" | 37 #include "chrome/common/pref_names.h" |
| 36 #include "chrome/common/worker_thread_ticker.h" | 38 #include "chrome/common/worker_thread_ticker.h" |
| 37 #include "chrome/installer/util/browser_distribution.h" | 39 #include "chrome/installer/util/browser_distribution.h" |
| 38 #include "chrome/installer/util/google_update_settings.h" | 40 #include "chrome/installer/util/google_update_settings.h" |
| 39 #include "chrome/installer/util/install_util.h" | 41 #include "chrome/installer/util/install_util.h" |
| 40 #include "chrome/installer/util/master_preferences.h" | 42 #include "chrome/installer/util/master_preferences.h" |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 scoped_refptr<ImporterHost> importer_host; | 543 scoped_refptr<ImporterHost> importer_host; |
| 542 importer_host = new ImporterHost; | 544 importer_host = new ImporterHost; |
| 543 | 545 |
| 544 internal::AutoImportPlatformCommon(importer_host, profile, homepage_defined, | 546 internal::AutoImportPlatformCommon(importer_host, profile, homepage_defined, |
| 545 import_items, dont_import_items, | 547 import_items, dont_import_items, |
| 546 make_chrome_default); | 548 make_chrome_default); |
| 547 | 549 |
| 548 process_singleton->Unlock(); | 550 process_singleton->Unlock(); |
| 549 CreateSentinel(); | 551 CreateSentinel(); |
| 550 #endif // !defined(USE_AURA) | 552 #endif // !defined(USE_AURA) |
| 553 browser::ShowFirstRunDefaultBrowserPrompt(profile); |
| 551 } | 554 } |
| 552 | 555 |
| 553 int ImportNow(Profile* profile, const CommandLine& cmdline) { | 556 int ImportNow(Profile* profile, const CommandLine& cmdline) { |
| 554 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); | 557 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); |
| 555 #if !defined(USE_AURA) | 558 #if !defined(USE_AURA) |
| 556 if (cmdline.HasSwitch(switches::kImport)) { | 559 if (cmdline.HasSwitch(switches::kImport)) { |
| 557 return_code = ImportFromBrowser(profile, cmdline); | 560 return_code = ImportFromBrowser(profile, cmdline); |
| 558 } | 561 } |
| 559 #endif | 562 #endif |
| 560 return return_code; | 563 return return_code; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 return false; | 604 return false; |
| 602 | 605 |
| 603 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); | 606 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); |
| 604 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); | 607 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); |
| 605 internal::SetDefaultBrowser(install_prefs.get()); | 608 internal::SetDefaultBrowser(install_prefs.get()); |
| 606 | 609 |
| 607 return false; | 610 return false; |
| 608 } | 611 } |
| 609 | 612 |
| 610 } // namespace first_run | 613 } // namespace first_run |
| OLD | NEW |