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

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

Issue 2038813003: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 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
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/resource_dispatcher_host_impl.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/navigation_resource_throttle.h" 5 #include "content/browser/loader/navigation_resource_throttle.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 28 matching lines...) Expand all
39 DCHECK_NE(result, NavigationThrottle::DEFER); 39 DCHECK_NE(result, NavigationThrottle::DEFER);
40 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 40 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
41 base::Bind(callback, result)); 41 base::Bind(callback, result));
42 } 42 }
43 43
44 void CheckWillStartRequestOnUIThread( 44 void CheckWillStartRequestOnUIThread(
45 UIChecksPerformedCallback callback, 45 UIChecksPerformedCallback callback,
46 int render_process_id, 46 int render_process_id,
47 int render_frame_host_id, 47 int render_frame_host_id,
48 const std::string& method, 48 const std::string& method,
49 const scoped_refptr<content::ResourceRequestBody>& resource_request_body, 49 const scoped_refptr<content::ResourceRequestBodyImpl>&
50 resource_request_body,
50 const Referrer& sanitized_referrer, 51 const Referrer& sanitized_referrer,
51 bool has_user_gesture, 52 bool has_user_gesture,
52 ui::PageTransition transition, 53 ui::PageTransition transition,
53 bool is_external_protocol) { 54 bool is_external_protocol) {
54 DCHECK_CURRENTLY_ON(BrowserThread::UI); 55 DCHECK_CURRENTLY_ON(BrowserThread::UI);
55 RenderFrameHostImpl* render_frame_host = 56 RenderFrameHostImpl* render_frame_host =
56 RenderFrameHostImpl::FromID(render_process_id, render_frame_host_id); 57 RenderFrameHostImpl::FromID(render_process_id, render_frame_host_id);
57 if (!render_frame_host) { 58 if (!render_frame_host) {
58 SendCheckResultToIOThread(callback, NavigationThrottle::PROCEED); 59 SendCheckResultToIOThread(callback, NavigationThrottle::PROCEED);
59 return; 60 return;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } else if (result == NavigationThrottle::CANCEL) { 270 } else if (result == NavigationThrottle::CANCEL) {
270 controller()->Cancel(); 271 controller()->Cancel();
271 } else if (result == NavigationThrottle::BLOCK_REQUEST) { 272 } else if (result == NavigationThrottle::BLOCK_REQUEST) {
272 controller()->CancelWithError(net::ERR_BLOCKED_BY_CLIENT); 273 controller()->CancelWithError(net::ERR_BLOCKED_BY_CLIENT);
273 } else { 274 } else {
274 controller()->Resume(); 275 controller()->Resume();
275 } 276 }
276 } 277 }
277 278
278 } // namespace content 279 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/DEPS ('k') | content/browser/loader/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698