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 <set> | 5 #include <set> |
6 | 6 |
7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/deferred_sequenced_task_runner.h" |
11 #include "base/file_util.h" | 12 #include "base/file_util.h" |
12 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
13 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
14 #include "base/prefs/pref_registry_simple.h" | 15 #include "base/prefs/pref_registry_simple.h" |
15 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
16 #include "base/string_util.h" | 17 #include "base/string_util.h" |
17 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
18 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
19 #include "chrome/browser/bookmarks/bookmark_model.h" | 20 #include "chrome/browser/bookmarks/bookmark_model.h" |
20 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 21 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 extensions::ExtensionSystem::Get(profile)->extension_service()); | 755 extensions::ExtensionSystem::Get(profile)->extension_service()); |
755 } | 756 } |
756 } | 757 } |
757 #endif | 758 #endif |
758 #if defined(ENABLE_MANAGED_USERS) | 759 #if defined(ENABLE_MANAGED_USERS) |
759 // Initialization needs to happen after extension system initialization (for | 760 // Initialization needs to happen after extension system initialization (for |
760 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the | 761 // extension::ManagementPolicy) and InitProfileUserPrefs (for setting the |
761 // initializing the managed flag if necessary). | 762 // initializing the managed flag if necessary). |
762 ManagedUserServiceFactory::GetForProfile(profile)->Init(); | 763 ManagedUserServiceFactory::GetForProfile(profile)->Init(); |
763 #endif | 764 #endif |
| 765 // Start loading the bookmarks after the profile is loaded. |
| 766 BookmarkModelFactory::GetForProfile(profile)->StartLoading(); |
764 } | 767 } |
765 | 768 |
766 void ProfileManager::DoFinalInitLogging(Profile* profile) { | 769 void ProfileManager::DoFinalInitLogging(Profile* profile) { |
767 // Count number of extensions in this profile. | 770 // Count number of extensions in this profile. |
768 int extension_count = -1; | 771 int extension_count = -1; |
769 #if defined(ENABLE_EXTENSIONS) | 772 #if defined(ENABLE_EXTENSIONS) |
770 ExtensionService* extension_service = profile->GetExtensionService(); | 773 ExtensionService* extension_service = profile->GetExtensionService(); |
771 if (extension_service) | 774 if (extension_service) |
772 extension_count = extension_service->GetAppIds().size(); | 775 extension_count = extension_service->GetAppIds().size(); |
773 #endif | 776 #endif |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 ProfileManager::ProfileInfo::ProfileInfo( | 1113 ProfileManager::ProfileInfo::ProfileInfo( |
1111 Profile* profile, | 1114 Profile* profile, |
1112 bool created) | 1115 bool created) |
1113 : profile(profile), | 1116 : profile(profile), |
1114 created(created) { | 1117 created(created) { |
1115 } | 1118 } |
1116 | 1119 |
1117 ProfileManager::ProfileInfo::~ProfileInfo() { | 1120 ProfileManager::ProfileInfo::~ProfileInfo() { |
1118 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1121 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
1119 } | 1122 } |
OLD | NEW |