| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include "chrome/browser/user_style_sheet_watcher.h" | 68 #include "chrome/browser/user_style_sheet_watcher.h" |
| 69 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" | 69 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" |
| 70 #include "chrome/browser/visitedlink/visitedlink_master.h" | 70 #include "chrome/browser/visitedlink/visitedlink_master.h" |
| 71 #include "chrome/browser/web_resource/promo_resource_service.h" | 71 #include "chrome/browser/web_resource/promo_resource_service.h" |
| 72 #include "chrome/browser/webdata/web_data_service.h" | 72 #include "chrome/browser/webdata/web_data_service.h" |
| 73 #include "chrome/common/chrome_constants.h" | 73 #include "chrome/common/chrome_constants.h" |
| 74 #include "chrome/common/chrome_notification_types.h" | 74 #include "chrome/common/chrome_notification_types.h" |
| 75 #include "chrome/common/chrome_paths_internal.h" | 75 #include "chrome/common/chrome_paths_internal.h" |
| 76 #include "chrome/common/chrome_switches.h" | 76 #include "chrome/common/chrome_switches.h" |
| 77 #include "chrome/common/chrome_version_info.h" | 77 #include "chrome/common/chrome_version_info.h" |
| 78 #include "chrome/common/extensions/extension_permission_set.h" | |
| 79 #include "chrome/common/pref_names.h" | 78 #include "chrome/common/pref_names.h" |
| 80 #include "chrome/common/url_constants.h" | 79 #include "chrome/common/url_constants.h" |
| 81 #include "content/public/browser/browser_thread.h" | 80 #include "content/public/browser/browser_thread.h" |
| 82 #include "content/public/browser/host_zoom_map.h" | 81 #include "content/public/browser/host_zoom_map.h" |
| 83 #include "content/public/browser/notification_service.h" | 82 #include "content/public/browser/notification_service.h" |
| 84 #include "content/public/browser/user_metrics.h" | 83 #include "content/public/browser/user_metrics.h" |
| 85 #include "grit/chromium_strings.h" | 84 #include "grit/chromium_strings.h" |
| 86 #include "ui/base/l10n/l10n_util.h" | 85 #include "ui/base/l10n/l10n_util.h" |
| 87 | 86 |
| 88 #if defined(OS_WIN) | 87 #if defined(OS_WIN) |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 return request_context; | 696 return request_context; |
| 698 } | 697 } |
| 699 | 698 |
| 700 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( | 699 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( |
| 701 int renderer_child_id) { | 700 int renderer_child_id) { |
| 702 ExtensionService* extension_service = | 701 ExtensionService* extension_service = |
| 703 ExtensionSystem::Get(this)->extension_service(); | 702 ExtensionSystem::Get(this)->extension_service(); |
| 704 if (extension_service) { | 703 if (extension_service) { |
| 705 const Extension* installed_app = extension_service-> | 704 const Extension* installed_app = extension_service-> |
| 706 GetInstalledAppForRenderer(renderer_child_id); | 705 GetInstalledAppForRenderer(renderer_child_id); |
| 707 if (installed_app != NULL && installed_app->is_storage_isolated() && | 706 if (installed_app != NULL && installed_app->is_storage_isolated()) { |
| 708 installed_app->HasAPIPermission( | |
| 709 ExtensionAPIPermission::kExperimental)) { | |
| 710 return GetRequestContextForIsolatedApp(installed_app->id()); | 707 return GetRequestContextForIsolatedApp(installed_app->id()); |
| 711 } | 708 } |
| 712 } | 709 } |
| 713 return GetRequestContext(); | 710 return GetRequestContext(); |
| 714 } | 711 } |
| 715 | 712 |
| 716 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { | 713 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { |
| 717 return io_data_.GetMediaRequestContextGetter(); | 714 return io_data_.GetMediaRequestContextGetter(); |
| 718 } | 715 } |
| 719 | 716 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 if (!path.empty()) | 1155 if (!path.empty()) |
| 1159 *cache_path = path; | 1156 *cache_path = path; |
| 1160 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : | 1157 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : |
| 1161 prefs_->GetInteger(prefs::kDiskCacheSize); | 1158 prefs_->GetInteger(prefs::kDiskCacheSize); |
| 1162 } | 1159 } |
| 1163 | 1160 |
| 1164 base::Callback<ChromeURLDataManagerBackend*(void)> | 1161 base::Callback<ChromeURLDataManagerBackend*(void)> |
| 1165 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { | 1162 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { |
| 1166 return io_data_.GetChromeURLDataManagerBackendGetter(); | 1163 return io_data_.GetChromeURLDataManagerBackendGetter(); |
| 1167 } | 1164 } |
| OLD | NEW |