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

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

Issue 1617043002: Introduce AncestorThrottle, which will process 'X-Frame-Options' headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@block-response
Patch Set: Test+ErrorPage Created 4 years, 7 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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return "NavigationResourceThrottle"; 228 return "NavigationResourceThrottle";
229 } 229 }
230 230
231 void NavigationResourceThrottle::OnUIChecksPerformed( 231 void NavigationResourceThrottle::OnUIChecksPerformed(
232 NavigationThrottle::ThrottleCheckResult result) { 232 NavigationThrottle::ThrottleCheckResult result) {
233 DCHECK_CURRENTLY_ON(BrowserThread::IO); 233 DCHECK_CURRENTLY_ON(BrowserThread::IO);
234 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { 234 if (result == NavigationThrottle::CANCEL_AND_IGNORE) {
235 controller()->CancelAndIgnore(); 235 controller()->CancelAndIgnore();
236 } else if (result == NavigationThrottle::CANCEL) { 236 } else if (result == NavigationThrottle::CANCEL) {
237 controller()->Cancel(); 237 controller()->Cancel();
238 } else if (result == NavigationThrottle::BLOCK_RESPONSE) {
239 controller()->CancelWithError(net::ERR_BLOCKED_BY_RESPONSE);
mmenke 2016/05/02 18:17:29 Is this only for subframes, or is it for the main
Mike West 2016/05/05 08:14:28 The throttle introduced in this CL is only for sub
238 } else { 240 } else {
239 controller()->Resume(); 241 controller()->Resume();
240 } 242 }
241 } 243 }
242 244
243 } // namespace content 245 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698