| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" | 75 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" |
| 76 #include "chrome/browser/user_style_sheet_watcher.h" | 76 #include "chrome/browser/user_style_sheet_watcher.h" |
| 77 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" | 77 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" |
| 78 #include "chrome/browser/visitedlink/visitedlink_master.h" | 78 #include "chrome/browser/visitedlink/visitedlink_master.h" |
| 79 #include "chrome/browser/web_resource/promo_resource_service.h" | 79 #include "chrome/browser/web_resource/promo_resource_service.h" |
| 80 #include "chrome/browser/webdata/web_data_service.h" | 80 #include "chrome/browser/webdata/web_data_service.h" |
| 81 #include "chrome/common/chrome_constants.h" | 81 #include "chrome/common/chrome_constants.h" |
| 82 #include "chrome/common/chrome_paths.h" | 82 #include "chrome/common/chrome_paths.h" |
| 83 #include "chrome/common/chrome_paths_internal.h" | 83 #include "chrome/common/chrome_paths_internal.h" |
| 84 #include "chrome/common/chrome_switches.h" | 84 #include "chrome/common/chrome_switches.h" |
| 85 #include "chrome/common/extensions/extension_permission_set.h" |
| 85 #include "chrome/common/json_pref_store.h" | 86 #include "chrome/common/json_pref_store.h" |
| 86 #include "chrome/common/pref_names.h" | 87 #include "chrome/common/pref_names.h" |
| 87 #include "chrome/common/render_messages.h" | 88 #include "chrome/common/render_messages.h" |
| 88 #include "chrome/common/spellcheck_messages.h" | 89 #include "chrome/common/spellcheck_messages.h" |
| 89 #include "content/browser/appcache/chrome_appcache_service.h" | 90 #include "content/browser/appcache/chrome_appcache_service.h" |
| 90 #include "content/browser/browser_thread.h" | 91 #include "content/browser/browser_thread.h" |
| 91 #include "content/browser/chrome_blob_storage_context.h" | 92 #include "content/browser/chrome_blob_storage_context.h" |
| 92 #include "content/browser/file_system/browser_file_system_helper.h" | 93 #include "content/browser/file_system/browser_file_system_helper.h" |
| 93 #include "content/browser/host_zoom_map.h" | 94 #include "content/browser/host_zoom_map.h" |
| 94 #include "content/browser/in_process_webkit/webkit_context.h" | 95 #include "content/browser/in_process_webkit/webkit_context.h" |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 | 877 |
| 877 return request_context; | 878 return request_context; |
| 878 } | 879 } |
| 879 | 880 |
| 880 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( | 881 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( |
| 881 int renderer_child_id) { | 882 int renderer_child_id) { |
| 882 if (extension_service_.get()) { | 883 if (extension_service_.get()) { |
| 883 const Extension* installed_app = extension_service_-> | 884 const Extension* installed_app = extension_service_-> |
| 884 GetInstalledAppForRenderer(renderer_child_id); | 885 GetInstalledAppForRenderer(renderer_child_id); |
| 885 if (installed_app != NULL && installed_app->is_storage_isolated() && | 886 if (installed_app != NULL && installed_app->is_storage_isolated() && |
| 886 installed_app->HasApiPermission(Extension::kExperimentalPermission)) { | 887 installed_app->HasAPIPermission( |
| 888 ExtensionAPIPermission::kExperimental)) { |
| 887 return GetRequestContextForIsolatedApp(installed_app->id()); | 889 return GetRequestContextForIsolatedApp(installed_app->id()); |
| 888 } | 890 } |
| 889 } | 891 } |
| 890 return GetRequestContext(); | 892 return GetRequestContext(); |
| 891 } | 893 } |
| 892 | 894 |
| 893 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { | 895 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { |
| 894 return io_data_.GetMediaRequestContextGetter(); | 896 return io_data_.GetMediaRequestContextGetter(); |
| 895 } | 897 } |
| 896 | 898 |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1648 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
| 1647 return NULL; | 1649 return NULL; |
| 1648 if (!prerender_manager_.get()) { | 1650 if (!prerender_manager_.get()) { |
| 1649 CHECK(g_browser_process->prerender_tracker()); | 1651 CHECK(g_browser_process->prerender_tracker()); |
| 1650 prerender_manager_.reset( | 1652 prerender_manager_.reset( |
| 1651 new prerender::PrerenderManager( | 1653 new prerender::PrerenderManager( |
| 1652 this, g_browser_process->prerender_tracker())); | 1654 this, g_browser_process->prerender_tracker())); |
| 1653 } | 1655 } |
| 1654 return prerender_manager_.get(); | 1656 return prerender_manager_.get(); |
| 1655 } | 1657 } |
| OLD | NEW |