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

Side by Side Diff: content/browser/loader/cross_site_resource_handler.cc

Issue 15682009: Eliminate SwapOut message parameters, keeping state in RVHM instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to get Android build fix Created 7 years, 6 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/loader/cross_site_resource_handler.h" 5 #include "content/browser/loader/cross_site_resource_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "content/browser/loader/resource_request_info_impl.h" 11 #include "content/browser/loader/resource_request_info_impl.h"
12 #include "content/browser/renderer_host/render_view_host_delegate.h" 12 #include "content/browser/renderer_host/render_view_host_delegate.h"
13 #include "content/browser/renderer_host/render_view_host_impl.h" 13 #include "content/browser/renderer_host/render_view_host_impl.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/global_request_id.h"
15 #include "content/public/browser/resource_controller.h" 16 #include "content/public/browser/resource_controller.h"
16 #include "content/public/common/resource_response.h" 17 #include "content/public/common/resource_response.h"
17 #include "net/http/http_response_headers.h" 18 #include "net/http/http_response_headers.h"
18 19
19 namespace content { 20 namespace content {
20 21
21 namespace { 22 namespace {
22 23
23 void OnCrossSiteResponseHelper(int render_process_id, 24 void OnCrossSiteResponseHelper(int render_process_id,
24 int render_view_id, 25 int render_view_id,
25 int request_id) { 26 int request_id) {
26 RenderViewHostImpl* rvh = RenderViewHostImpl::FromID(render_process_id, 27 RenderViewHostImpl* rvh = RenderViewHostImpl::FromID(render_process_id,
27 render_view_id); 28 render_view_id);
28 if (rvh && rvh->GetDelegate()->GetRendererManagementDelegate()) { 29 if (rvh && rvh->GetDelegate()->GetRendererManagementDelegate()) {
29 rvh->GetDelegate()->GetRendererManagementDelegate()->OnCrossSiteResponse( 30 rvh->GetDelegate()->GetRendererManagementDelegate()->OnCrossSiteResponse(
30 render_process_id, request_id); 31 rvh, GlobalRequestID(render_process_id, request_id));
31 } 32 }
32 } 33 }
33 34
34 } // namespace 35 } // namespace
35 36
36 CrossSiteResourceHandler::CrossSiteResourceHandler( 37 CrossSiteResourceHandler::CrossSiteResourceHandler(
37 scoped_ptr<ResourceHandler> next_handler, 38 scoped_ptr<ResourceHandler> next_handler,
38 int render_process_host_id, 39 int render_process_host_id,
39 int render_view_id, 40 int render_view_id,
40 net::URLRequest* request) 41 net::URLRequest* request)
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 210 }
210 211
211 void CrossSiteResourceHandler::ResumeIfDeferred() { 212 void CrossSiteResourceHandler::ResumeIfDeferred() {
212 if (did_defer_) { 213 if (did_defer_) {
213 did_defer_ = false; 214 did_defer_ = false;
214 controller()->Resume(); 215 controller()->Resume();
215 } 216 }
216 } 217 }
217 218
218 } // namespace content 219 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/cross_site_request_manager.h ('k') | content/browser/loader/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698