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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/prefs/pref_service.h" | 17 #include "base/prefs/pref_service.h" |
18 #include "base/run_loop.h" | 18 #include "base/run_loop.h" |
19 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 #include "build/build_config.h" | 21 #include "build/build_config.h" |
22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
23 #include "chrome/browser/chrome_notification_types.h" | 23 #include "chrome/browser/chrome_notification_types.h" |
24 #include "chrome/browser/extensions/extension_service.h" | 24 #include "chrome/browser/extensions/extension_service.h" |
25 #include "chrome/browser/extensions/updater/extension_updater.h" | 25 #include "chrome/browser/extensions/updater/extension_updater.h" |
26 #include "chrome/browser/first_run/first_run_internal.h" | 26 #include "chrome/browser/first_run/first_run_internal.h" |
| 27 #include "chrome/browser/google/google_brand.h" |
27 #include "chrome/browser/google/google_util.h" | 28 #include "chrome/browser/google/google_util.h" |
28 #include "chrome/browser/importer/external_process_importer_host.h" | 29 #include "chrome/browser/importer/external_process_importer_host.h" |
29 #include "chrome/browser/importer/importer_list.h" | 30 #include "chrome/browser/importer/importer_list.h" |
30 #include "chrome/browser/importer/importer_progress_observer.h" | 31 #include "chrome/browser/importer/importer_progress_observer.h" |
31 #include "chrome/browser/importer/importer_uma.h" | 32 #include "chrome/browser/importer/importer_uma.h" |
32 #include "chrome/browser/importer/profile_writer.h" | 33 #include "chrome/browser/importer/profile_writer.h" |
33 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 34 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
34 #include "chrome/browser/profiles/profile.h" | 35 #include "chrome/browser/profiles/profile.h" |
35 #include "chrome/browser/profiles/profiles_state.h" | 36 #include "chrome/browser/profiles/profiles_state.h" |
36 #include "chrome/browser/search_engines/template_url_service.h" | 37 #include "chrome/browser/search_engines/template_url_service.h" |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 base::FilePath first_run_sentinel; | 560 base::FilePath first_run_sentinel; |
560 return GetFirstRunSentinelFilePath(&first_run_sentinel) && | 561 return GetFirstRunSentinelFilePath(&first_run_sentinel) && |
561 base::WriteFile(first_run_sentinel, "", 0) != -1; | 562 base::WriteFile(first_run_sentinel, "", 0) != -1; |
562 } | 563 } |
563 | 564 |
564 // -- Platform-specific functions -- | 565 // -- Platform-specific functions -- |
565 | 566 |
566 #if !defined(OS_LINUX) && !defined(OS_BSD) | 567 #if !defined(OS_LINUX) && !defined(OS_BSD) |
567 bool IsOrganicFirstRun() { | 568 bool IsOrganicFirstRun() { |
568 std::string brand; | 569 std::string brand; |
569 google_util::GetBrand(&brand); | 570 google_brand::GetBrand(&brand); |
570 return google_util::IsOrganicFirstRun(brand); | 571 return google_brand::IsOrganicFirstRun(brand); |
571 } | 572 } |
572 #endif | 573 #endif |
573 | 574 |
574 } // namespace internal | 575 } // namespace internal |
575 | 576 |
576 MasterPrefs::MasterPrefs() | 577 MasterPrefs::MasterPrefs() |
577 : ping_delay(0), | 578 : ping_delay(0), |
578 homepage_defined(false), | 579 homepage_defined(false), |
579 do_import_items(0), | 580 do_import_items(0), |
580 dont_import_items(0), | 581 dont_import_items(0), |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 SetShouldDoPersonalDataManagerFirstRun(); | 807 SetShouldDoPersonalDataManagerFirstRun(); |
807 | 808 |
808 internal::DoPostImportPlatformSpecificTasks(profile); | 809 internal::DoPostImportPlatformSpecificTasks(profile); |
809 } | 810 } |
810 | 811 |
811 uint16 auto_import_state() { | 812 uint16 auto_import_state() { |
812 return g_auto_import_state; | 813 return g_auto_import_state; |
813 } | 814 } |
814 | 815 |
815 } // namespace first_run | 816 } // namespace first_run |
OLD | NEW |