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 "base/callback.h" | 7 #include "base/callback.h" |
8 #include "content/browser/frame_host/navigation_handle_impl.h" | 8 #include "content/browser/frame_host/navigation_handle_impl.h" |
9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
10 #include "content/public/browser/resource_context.h" | 10 #include "content/public/browser/resource_context.h" |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 const char* NavigationResourceThrottle::GetNameForLogging() const { | 156 const char* NavigationResourceThrottle::GetNameForLogging() const { |
157 return "NavigationResourceThrottle"; | 157 return "NavigationResourceThrottle"; |
158 } | 158 } |
159 | 159 |
160 void NavigationResourceThrottle::OnUIChecksPerformed( | 160 void NavigationResourceThrottle::OnUIChecksPerformed( |
161 NavigationThrottle::ThrottleCheckResult result) { | 161 NavigationThrottle::ThrottleCheckResult result) { |
162 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 162 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
163 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { | 163 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { |
164 controller()->CancelAndIgnore(); | 164 controller()->CancelAndIgnore(); |
| 165 } else if (result == NavigationThrottle::CANCEL) { |
| 166 controller()->Cancel(); |
165 } else { | 167 } else { |
166 controller()->Resume(); | 168 controller()->Resume(); |
167 } | 169 } |
168 } | 170 } |
169 | 171 |
170 } // namespace content | 172 } // namespace content |
OLD | NEW |