| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 scoped_refptr<ImporterHost> importer_host; | 528 scoped_refptr<ImporterHost> importer_host; |
| 527 importer_host = new ImporterHost; | 529 importer_host = new ImporterHost; |
| 528 | 530 |
| 529 internal::AutoImportPlatformCommon(importer_host, profile, homepage_defined, | 531 internal::AutoImportPlatformCommon(importer_host, profile, homepage_defined, |
| 530 import_items, dont_import_items, | 532 import_items, dont_import_items, |
| 531 make_chrome_default); | 533 make_chrome_default); |
| 532 | 534 |
| 533 process_singleton->Unlock(); | 535 process_singleton->Unlock(); |
| 534 CreateSentinel(); | 536 CreateSentinel(); |
| 535 #endif // !defined(USE_AURA) | 537 #endif // !defined(USE_AURA) |
| 538 if (ShellIntegration::IsDefaultBrowser() != |
| 539 ShellIntegration::IS_DEFAULT_WEB_CLIENT) { |
| 540 browser::ShowFirstRunDefaultBrowserPrompt(profile); |
| 541 } |
| 536 } | 542 } |
| 537 | 543 |
| 538 int ImportNow(Profile* profile, const CommandLine& cmdline) { | 544 int ImportNow(Profile* profile, const CommandLine& cmdline) { |
| 539 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); | 545 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); |
| 540 #if !defined(USE_AURA) | 546 #if !defined(USE_AURA) |
| 541 if (cmdline.HasSwitch(switches::kImport)) { | 547 if (cmdline.HasSwitch(switches::kImport)) { |
| 542 return_code = ImportFromBrowser(profile, cmdline); | 548 return_code = ImportFromBrowser(profile, cmdline); |
| 543 } | 549 } |
| 544 #endif | 550 #endif |
| 545 return return_code; | 551 return return_code; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 return false; | 592 return false; |
| 587 | 593 |
| 588 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); | 594 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); |
| 589 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); | 595 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); |
| 590 internal::SetDefaultBrowser(install_prefs.get()); | 596 internal::SetDefaultBrowser(install_prefs.get()); |
| 591 | 597 |
| 592 return false; | 598 return false; |
| 593 } | 599 } |
| 594 | 600 |
| 595 } // namespace first_run | 601 } // namespace first_run |
| OLD | NEW |