Chromium Code Reviews| 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_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 #include "chrome/browser/extensions/event_router.h" | 34 #include "chrome/browser/extensions/event_router.h" |
| 35 #include "chrome/browser/extensions/extension_pref_store.h" | 35 #include "chrome/browser/extensions/extension_pref_store.h" |
| 36 #include "chrome/browser/extensions/extension_pref_value_map.h" | 36 #include "chrome/browser/extensions/extension_pref_value_map.h" |
| 37 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" | 37 #include "chrome/browser/extensions/extension_pref_value_map_factory.h" |
| 38 #include "chrome/browser/extensions/extension_process_manager.h" | 38 #include "chrome/browser/extensions/extension_process_manager.h" |
| 39 #include "chrome/browser/extensions/extension_service.h" | 39 #include "chrome/browser/extensions/extension_service.h" |
| 40 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 40 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 41 #include "chrome/browser/extensions/extension_system.h" | 41 #include "chrome/browser/extensions/extension_system.h" |
| 42 #include "chrome/browser/extensions/user_script_master.h" | 42 #include "chrome/browser/extensions/user_script_master.h" |
| 43 #include "chrome/browser/favicon/favicon_service.h" | 43 #include "chrome/browser/favicon/favicon_service.h" |
| 44 #include "chrome/browser/favicon/favicon_service_factory.h" | |
| 44 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" | 45 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" |
| 45 #include "chrome/browser/history/history.h" | 46 #include "chrome/browser/history/history.h" |
| 46 #include "chrome/browser/history/history_service_factory.h" | 47 #include "chrome/browser/history/history_service_factory.h" |
| 47 #include "chrome/browser/history/shortcuts_backend.h" | 48 #include "chrome/browser/history/shortcuts_backend.h" |
| 48 #include "chrome/browser/history/top_sites.h" | 49 #include "chrome/browser/history/top_sites.h" |
| 49 #include "chrome/browser/instant/instant_controller.h" | 50 #include "chrome/browser/instant/instant_controller.h" |
| 50 #include "chrome/browser/metrics/metrics_service.h" | 51 #include "chrome/browser/metrics/metrics_service.h" |
| 51 #include "chrome/browser/net/chrome_url_request_context.h" | 52 #include "chrome/browser/net/chrome_url_request_context.h" |
| 52 #include "chrome/browser/net/net_pref_observer.h" | 53 #include "chrome/browser/net/net_pref_observer.h" |
| 53 #include "chrome/browser/net/predictor.h" | 54 #include "chrome/browser/net/predictor.h" |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 708 } | 709 } |
| 709 | 710 |
| 710 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { | 711 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { |
| 711 return io_data_.GetMediaRequestContextGetter(); | 712 return io_data_.GetMediaRequestContextGetter(); |
| 712 } | 713 } |
| 713 | 714 |
| 714 content::ResourceContext* ProfileImpl::GetResourceContext() { | 715 content::ResourceContext* ProfileImpl::GetResourceContext() { |
| 715 return io_data_.GetResourceContext(); | 716 return io_data_.GetResourceContext(); |
| 716 } | 717 } |
| 717 | 718 |
| 718 FaviconService* ProfileImpl::GetFaviconService(ServiceAccessType sat) { | 719 FaviconService* ProfileImpl::GetFaviconService(ServiceAccessType sat) { |
|
Elliot Glaysher
2012/08/16 19:37:49
This is OK as long as you plan to come back and pu
andreip3000
2012/08/17 09:34:57
Yes, that's my next patch. I looked into doing thi
| |
| 719 if (!favicon_service_created_) { | 720 return FaviconServiceFactory::GetForProfile(this); |
| 720 favicon_service_created_ = true; | |
| 721 favicon_service_.reset(new FaviconService(this)); | |
| 722 } | |
| 723 return favicon_service_.get(); | |
| 724 } | 721 } |
| 725 | 722 |
| 726 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { | 723 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForExtensions() { |
| 727 return io_data_.GetExtensionsRequestContextGetter(); | 724 return io_data_.GetExtensionsRequestContextGetter(); |
| 728 } | 725 } |
| 729 | 726 |
| 730 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForIsolatedApp( | 727 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForIsolatedApp( |
| 731 const std::string& app_id) { | 728 const std::string& app_id) { |
| 732 return io_data_.GetIsolatedAppRequestContextGetter(app_id); | 729 return io_data_.GetIsolatedAppRequestContextGetter(app_id); |
| 733 } | 730 } |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1091 if (!path.empty()) | 1088 if (!path.empty()) |
| 1092 *cache_path = path; | 1089 *cache_path = path; |
| 1093 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1090 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1094 prefs_->GetInteger(prefs::kDiskCacheSize); | 1091 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1095 } | 1092 } |
| 1096 | 1093 |
| 1097 base::Callback<ChromeURLDataManagerBackend*(void)> | 1094 base::Callback<ChromeURLDataManagerBackend*(void)> |
| 1098 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1095 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
| 1099 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1096 return io_data_.GetChromeURLDataManagerBackendGetter(); |
| 1100 } | 1097 } |
| OLD | NEW |