Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Side by Side Diff: content/shell/shell_browser_context.cc

Issue 9369009: Make content::ResourceContext be a real interface like the rest of the Content API (i.e. don't ha... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | content/shell/shell_content_browser_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "content/shell/shell_browser_context.h" 5 #include "content/shell/shell_browser_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 ShellBrowserContext::GetRequestContextForRenderProcess( 160 ShellBrowserContext::GetRequestContextForRenderProcess(
161 int renderer_child_id) { 161 int renderer_child_id) {
162 return GetRequestContext(); 162 return GetRequestContext();
163 } 163 }
164 164
165 net::URLRequestContextGetter* 165 net::URLRequestContextGetter*
166 ShellBrowserContext::GetRequestContextForMedia() { 166 ShellBrowserContext::GetRequestContextForMedia() {
167 return GetRequestContext(); 167 return GetRequestContext();
168 } 168 }
169 169
170 const ResourceContext& ShellBrowserContext::GetResourceContext() { 170 ResourceContext* ShellBrowserContext::GetResourceContext() {
171 if (!resource_context_.get()) { 171 if (!resource_context_.get()) {
172 resource_context_.reset(new ShellResourceContext( 172 resource_context_.reset(new ShellResourceContext(
173 static_cast<ShellURLRequestContextGetter*>(GetRequestContext()), 173 static_cast<ShellURLRequestContextGetter*>(GetRequestContext()),
174 GetBlobStorageContext())); 174 GetBlobStorageContext()));
175 } 175 }
176 return *resource_context_.get(); 176 return resource_context_.get();
177 } 177 }
178 178
179 HostZoomMap* ShellBrowserContext::GetHostZoomMap() { 179 HostZoomMap* ShellBrowserContext::GetHostZoomMap() {
180 if (!host_zoom_map_) 180 if (!host_zoom_map_)
181 host_zoom_map_ = HostZoomMap::Create(); 181 host_zoom_map_ = HostZoomMap::Create();
182 return host_zoom_map_.get(); 182 return host_zoom_map_.get();
183 } 183 }
184 184
185 GeolocationPermissionContext* 185 GeolocationPermissionContext*
186 ShellBrowserContext::GetGeolocationPermissionContext() { 186 ShellBrowserContext::GetGeolocationPermissionContext() {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 BrowserThread::WEBKIT_DEPRECATED)); 259 BrowserThread::WEBKIT_DEPRECATED));
260 appcache_service_ = new ChromeAppCacheService(quota_manager_->proxy()); 260 appcache_service_ = new ChromeAppCacheService(quota_manager_->proxy());
261 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; 261 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy;
262 BrowserThread::PostTask( 262 BrowserThread::PostTask(
263 BrowserThread::IO, FROM_HERE, 263 BrowserThread::IO, FROM_HERE,
264 base::Bind( 264 base::Bind(
265 &ChromeAppCacheService::InitializeOnIOThread, 265 &ChromeAppCacheService::InitializeOnIOThread,
266 appcache_service_.get(), 266 appcache_service_.get(),
267 IsOffTheRecord() 267 IsOffTheRecord()
268 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), 268 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")),
269 &GetResourceContext(), 269 GetResourceContext(),
270 special_storage_policy)); 270 special_storage_policy));
271 } 271 }
272 272
273 } // namespace content 273 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_browser_context.h ('k') | content/shell/shell_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698