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

Side by Side Diff: content/browser/renderer_host/async_resource_handler.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
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/browser/renderer_host/async_resource_handler.h" 5 #include "content/browser/renderer_host/async_resource_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // request commits, avoiding the possibility of e.g. zooming the old content 126 // request commits, avoiding the possibility of e.g. zooming the old content
127 // or of having to layout the new content twice. 127 // or of having to layout the new content twice.
128 net::URLRequest* request = rdh_->GetURLRequest( 128 net::URLRequest* request = rdh_->GetURLRequest(
129 GlobalRequestID(filter_->child_id(), request_id)); 129 GlobalRequestID(filter_->child_id(), request_id));
130 130
131 if (rdh_->delegate()) 131 if (rdh_->delegate())
132 rdh_->delegate()->OnResponseStarted(request, response, filter_); 132 rdh_->delegate()->OnResponseStarted(request, response, filter_);
133 133
134 DevToolsNetLogObserver::PopulateResponseInfo(request, response); 134 DevToolsNetLogObserver::PopulateResponseInfo(request, response);
135 135
136 const content::ResourceContext& resource_context = 136 content::ResourceContext* resource_context = filter_->resource_context();
137 filter_->resource_context(); 137 content::HostZoomMap* host_zoom_map = resource_context->GetHostZoomMap();
138 content::HostZoomMap* host_zoom_map = resource_context.host_zoom_map();
139 138
140 ResourceDispatcherHostRequestInfo* info = rdh_->InfoForRequest(request); 139 ResourceDispatcherHostRequestInfo* info = rdh_->InfoForRequest(request);
141 if (info->resource_type() == ResourceType::MAIN_FRAME && host_zoom_map) { 140 if (info->resource_type() == ResourceType::MAIN_FRAME && host_zoom_map) {
142 GURL request_url(request->url()); 141 GURL request_url(request->url());
143 filter_->Send(new ViewMsg_SetZoomLevelForLoadingURL( 142 filter_->Send(new ViewMsg_SetZoomLevelForLoadingURL(
144 info->route_id(), 143 info->route_id(),
145 request_url, host_zoom_map->GetZoomLevel(net::GetHostOrSpecFromURL( 144 request_url, host_zoom_map->GetZoomLevel(net::GetHostOrSpecFromURL(
146 request_url)))); 145 request_url))));
147 } 146 }
148 147
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 276
278 // static 277 // static
279 void AsyncResourceHandler::GlobalCleanup() { 278 void AsyncResourceHandler::GlobalCleanup() {
280 if (g_spare_read_buffer) { 279 if (g_spare_read_buffer) {
281 // Avoid the CHECK in SharedIOBuffer::~SharedIOBuffer(). 280 // Avoid the CHECK in SharedIOBuffer::~SharedIOBuffer().
282 SharedIOBuffer* tmp = g_spare_read_buffer; 281 SharedIOBuffer* tmp = g_spare_read_buffer;
283 g_spare_read_buffer = NULL; 282 g_spare_read_buffer = NULL;
284 tmp->Release(); 283 tmp->Release();
285 } 284 }
286 } 285 }
OLDNEW
« no previous file with comments | « content/browser/ppapi_plugin_process_host.h ('k') | content/browser/renderer_host/buffered_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698