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" |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 int import_items, | 676 int import_items, |
677 int dont_import_items, | 677 int dont_import_items, |
678 const std::string& import_bookmarks_path) { | 678 const std::string& import_bookmarks_path) { |
679 // Deletes itself. | 679 // Deletes itself. |
680 ImporterHost* importer_host = new ExternalProcessImporterHost; | 680 ImporterHost* importer_host = new ExternalProcessImporterHost; |
681 | 681 |
682 base::FilePath local_state_path; | 682 base::FilePath local_state_path; |
683 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); | 683 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); |
684 bool local_state_file_exists = file_util::PathExists(local_state_path); | 684 bool local_state_file_exists = file_util::PathExists(local_state_path); |
685 | 685 |
686 scoped_refptr<ImporterList> importer_list(new ImporterList(NULL)); | 686 scoped_refptr<ImporterList> importer_list(new ImporterList()); |
687 importer_list->DetectSourceProfilesHack( | 687 importer_list->DetectSourceProfilesHack( |
688 g_browser_process->GetApplicationLocale()); | 688 g_browser_process->GetApplicationLocale()); |
689 | 689 |
690 // Do import if there is an available profile for us to import. | 690 // Do import if there is an available profile for us to import. |
691 if (importer_list->count() > 0) { | 691 if (importer_list->count() > 0) { |
692 // Don't show the warning dialog if import fails. | 692 // Don't show the warning dialog if import fails. |
693 importer_host->set_headless(); | 693 importer_host->set_headless(); |
694 int items = 0; | 694 int items = 0; |
695 | 695 |
696 if (internal::IsOrganicFirstRun()) { | 696 if (internal::IsOrganicFirstRun()) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 SetShouldDoPersonalDataManagerFirstRun(); | 772 SetShouldDoPersonalDataManagerFirstRun(); |
773 | 773 |
774 internal::DoPostImportPlatformSpecificTasks(profile); | 774 internal::DoPostImportPlatformSpecificTasks(profile); |
775 } | 775 } |
776 | 776 |
777 uint16 auto_import_state() { | 777 uint16 auto_import_state() { |
778 return g_auto_import_state; | 778 return g_auto_import_state; |
779 } | 779 } |
780 | 780 |
781 } // namespace first_run | 781 } // namespace first_run |
OLD | NEW |