| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 scoped_refptr<ImporterHost> importer_host; | 545 scoped_refptr<ImporterHost> importer_host; |
| 544 importer_host = new ImporterHost; | 546 importer_host = new ImporterHost; |
| 545 | 547 |
| 546 internal::AutoImportPlatformCommon(importer_host, profile, homepage_defined, | 548 internal::AutoImportPlatformCommon(importer_host, profile, homepage_defined, |
| 547 import_items, dont_import_items, | 549 import_items, dont_import_items, |
| 548 make_chrome_default); | 550 make_chrome_default); |
| 549 | 551 |
| 550 process_singleton->Unlock(); | 552 process_singleton->Unlock(); |
| 551 CreateSentinel(); | 553 CreateSentinel(); |
| 552 #endif // !defined(USE_AURA) | 554 #endif // !defined(USE_AURA) |
| 555 if (ShellIntegration::IsDefaultBrowser() != |
| 556 ShellIntegration::IS_DEFAULT_WEB_CLIENT) { |
| 557 browser::ShowFirstRunDefaultBrowserPrompt(profile); |
| 558 } |
| 553 } | 559 } |
| 554 | 560 |
| 555 int ImportNow(Profile* profile, const CommandLine& cmdline) { | 561 int ImportNow(Profile* profile, const CommandLine& cmdline) { |
| 556 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); | 562 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); |
| 557 #if !defined(USE_AURA) | 563 #if !defined(USE_AURA) |
| 558 if (cmdline.HasSwitch(switches::kImport)) { | 564 if (cmdline.HasSwitch(switches::kImport)) { |
| 559 return_code = ImportFromBrowser(profile, cmdline); | 565 return_code = ImportFromBrowser(profile, cmdline); |
| 560 } | 566 } |
| 561 #endif | 567 #endif |
| 562 return return_code; | 568 return return_code; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 return false; | 609 return false; |
| 604 | 610 |
| 605 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); | 611 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); |
| 606 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); | 612 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); |
| 607 internal::SetDefaultBrowser(install_prefs.get()); | 613 internal::SetDefaultBrowser(install_prefs.get()); |
| 608 | 614 |
| 609 return false; | 615 return false; |
| 610 } | 616 } |
| 611 | 617 |
| 612 } // namespace first_run | 618 } // namespace first_run |
| OLD | NEW |