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/profiles/profile_manager.h" | 5 #include "chrome/browser/profiles/profile_manager.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 31 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
32 #include "chrome/browser/download/download_service.h" | 32 #include "chrome/browser/download/download_service.h" |
33 #include "chrome/browser/download/download_service_factory.h" | 33 #include "chrome/browser/download/download_service_factory.h" |
34 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" | 34 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" |
35 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 35 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
36 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" | 36 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact
ory.h" |
37 #include "chrome/browser/password_manager/password_manager_setting_migrator_serv
ice_factory.h" | 37 #include "chrome/browser/password_manager/password_manager_setting_migrator_serv
ice_factory.h" |
38 #include "chrome/browser/password_manager/password_store_factory.h" | 38 #include "chrome/browser/password_manager/password_store_factory.h" |
39 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 39 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
40 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" | 40 #include "chrome/browser/profiles/bookmark_model_loaded_observer.h" |
| 41 #include "chrome/browser/profiles/profile_attributes_storage.h" |
41 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 42 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
42 #include "chrome/browser/profiles/profile_destroyer.h" | 43 #include "chrome/browser/profiles/profile_destroyer.h" |
43 #include "chrome/browser/profiles/profile_info_cache.h" | 44 #include "chrome/browser/profiles/profile_info_cache.h" |
44 #include "chrome/browser/profiles/profile_metrics.h" | 45 #include "chrome/browser/profiles/profile_metrics.h" |
45 #include "chrome/browser/profiles/profile_statistics.h" | 46 #include "chrome/browser/profiles/profile_statistics.h" |
46 #include "chrome/browser/profiles/profiles_state.h" | 47 #include "chrome/browser/profiles/profiles_state.h" |
47 #include "chrome/browser/signin/account_fetcher_service_factory.h" | 48 #include "chrome/browser/signin/account_fetcher_service_factory.h" |
48 #include "chrome/browser/signin/account_reconcilor_factory.h" | 49 #include "chrome/browser/signin/account_reconcilor_factory.h" |
49 #include "chrome/browser/signin/account_tracker_service_factory.h" | 50 #include "chrome/browser/signin/account_tracker_service_factory.h" |
50 #include "chrome/browser/signin/cross_device_promo.h" | 51 #include "chrome/browser/signin/cross_device_promo.h" |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 656 |
656 ProfileInfoCache& ProfileManager::GetProfileInfoCache() { | 657 ProfileInfoCache& ProfileManager::GetProfileInfoCache() { |
657 TRACE_EVENT0("browser", "ProfileManager::GetProfileInfoCache"); | 658 TRACE_EVENT0("browser", "ProfileManager::GetProfileInfoCache"); |
658 if (!profile_info_cache_) { | 659 if (!profile_info_cache_) { |
659 profile_info_cache_.reset(new ProfileInfoCache( | 660 profile_info_cache_.reset(new ProfileInfoCache( |
660 g_browser_process->local_state(), user_data_dir_)); | 661 g_browser_process->local_state(), user_data_dir_)); |
661 } | 662 } |
662 return *profile_info_cache_.get(); | 663 return *profile_info_cache_.get(); |
663 } | 664 } |
664 | 665 |
| 666 ProfileAttributesStorage& ProfileManager::GetProfileAttributesStorage() { |
| 667 return GetProfileInfoCache(); |
| 668 } |
| 669 |
665 ProfileShortcutManager* ProfileManager::profile_shortcut_manager() { | 670 ProfileShortcutManager* ProfileManager::profile_shortcut_manager() { |
666 return profile_shortcut_manager_.get(); | 671 return profile_shortcut_manager_.get(); |
667 } | 672 } |
668 | 673 |
669 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 674 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
670 void ProfileManager::ScheduleProfileForDeletion( | 675 void ProfileManager::ScheduleProfileForDeletion( |
671 const base::FilePath& profile_dir, | 676 const base::FilePath& profile_dir, |
672 const CreateCallback& callback) { | 677 const CreateCallback& callback) { |
673 DCHECK(profiles::IsMultipleProfilesEnabled()); | 678 DCHECK(profiles::IsMultipleProfilesEnabled()); |
674 | 679 |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 | 1548 |
1544 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1549 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
1545 if (!original_callback.is_null()) | 1550 if (!original_callback.is_null()) |
1546 original_callback.Run(loaded_profile, status); | 1551 original_callback.Run(loaded_profile, status); |
1547 } | 1552 } |
1548 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) | 1553 #endif // !defined(OS_ANDROID) && !defined(OS_IOS) |
1549 | 1554 |
1550 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1555 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1551 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1556 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1552 } | 1557 } |
OLD | NEW |