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 11 matching lines...) Expand all Loading... | |
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" | 31 #include "chrome/browser/shell_integration.h" |
32 #include "chrome/browser/ui/startup/default_browser_prompt.h" | |
33 #include "chrome/common/chrome_notification_types.h" | 32 #include "chrome/common/chrome_notification_types.h" |
34 #include "chrome/common/chrome_paths.h" | 33 #include "chrome/common/chrome_paths.h" |
35 #include "chrome/common/chrome_result_codes.h" | 34 #include "chrome/common/chrome_result_codes.h" |
36 #include "chrome/common/chrome_switches.h" | 35 #include "chrome/common/chrome_switches.h" |
37 #include "chrome/common/pref_names.h" | 36 #include "chrome/common/pref_names.h" |
38 #include "chrome/common/worker_thread_ticker.h" | 37 #include "chrome/common/worker_thread_ticker.h" |
39 #include "chrome/installer/util/browser_distribution.h" | 38 #include "chrome/installer/util/browser_distribution.h" |
40 #include "chrome/installer/util/google_update_settings.h" | 39 #include "chrome/installer/util/google_update_settings.h" |
41 #include "chrome/installer/util/install_util.h" | 40 #include "chrome/installer/util/install_util.h" |
42 #include "chrome/installer/util/master_preferences.h" | 41 #include "chrome/installer/util/master_preferences.h" |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
543 scoped_refptr<ImporterHost> importer_host; | 542 scoped_refptr<ImporterHost> importer_host; |
544 importer_host = new ImporterHost; | 543 importer_host = new ImporterHost; |
545 | 544 |
546 internal::AutoImportPlatformCommon(importer_host, profile, homepage_defined, | 545 internal::AutoImportPlatformCommon(importer_host, profile, homepage_defined, |
547 import_items, dont_import_items, | 546 import_items, dont_import_items, |
548 make_chrome_default); | 547 make_chrome_default); |
549 | 548 |
550 process_singleton->Unlock(); | 549 process_singleton->Unlock(); |
551 CreateSentinel(); | 550 CreateSentinel(); |
552 #endif // !defined(USE_AURA) | 551 #endif // !defined(USE_AURA) |
553 chrome::ShowFirstRunDefaultBrowserPrompt(profile); | |
grt (UTC plus 2)
2012/07/05 17:16:09
nice.
motek.
2012/07/05 20:22:26
Thank you.
| |
554 } | 552 } |
555 | 553 |
556 int ImportNow(Profile* profile, const CommandLine& cmdline) { | 554 int ImportNow(Profile* profile, const CommandLine& cmdline) { |
557 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); | 555 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); |
558 #if !defined(USE_AURA) | 556 #if !defined(USE_AURA) |
559 if (cmdline.HasSwitch(switches::kImport)) { | 557 if (cmdline.HasSwitch(switches::kImport)) { |
560 return_code = ImportFromBrowser(profile, cmdline); | 558 return_code = ImportFromBrowser(profile, cmdline); |
561 } | 559 } |
562 #endif | 560 #endif |
563 return return_code; | 561 return return_code; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
604 return false; | 602 return false; |
605 | 603 |
606 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); | 604 internal::SetShowWelcomePagePrefIfNeeded(install_prefs.get()); |
607 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); | 605 internal::SetImportPreferencesAndLaunchImport(out_prefs, install_prefs.get()); |
608 internal::SetDefaultBrowser(install_prefs.get()); | 606 internal::SetDefaultBrowser(install_prefs.get()); |
609 | 607 |
610 return false; | 608 return false; |
611 } | 609 } |
612 | 610 |
613 } // namespace first_run | 611 } // namespace first_run |
OLD | NEW |