| OLD | NEW |
| 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 Loading... |
| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { | 268 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { |
| 268 controller()->CancelAndIgnore(); | 269 controller()->CancelAndIgnore(); |
| 269 } else if (result == NavigationThrottle::CANCEL) { | 270 } else if (result == NavigationThrottle::CANCEL) { |
| 270 controller()->Cancel(); | 271 controller()->Cancel(); |
| 271 } else { | 272 } else { |
| 272 controller()->Resume(); | 273 controller()->Resume(); |
| 273 } | 274 } |
| 274 } | 275 } |
| 275 | 276 |
| 276 } // namespace content | 277 } // namespace content |
| OLD | NEW |