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

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: Fix. Created 4 years, 8 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 return "NavigationResourceThrottle"; 230 return "NavigationResourceThrottle";
231 } 231 }
232 232
233 void NavigationResourceThrottle::OnUIChecksPerformed( 233 void NavigationResourceThrottle::OnUIChecksPerformed(
234 NavigationThrottle::ThrottleCheckResult result) { 234 NavigationThrottle::ThrottleCheckResult result) {
235 DCHECK_CURRENTLY_ON(BrowserThread::IO); 235 DCHECK_CURRENTLY_ON(BrowserThread::IO);
236 if (result == NavigationThrottle::CANCEL_AND_IGNORE) { 236 if (result == NavigationThrottle::CANCEL_AND_IGNORE) {
237 controller()->CancelAndIgnore(); 237 controller()->CancelAndIgnore();
238 } else if (result == NavigationThrottle::CANCEL) { 238 } else if (result == NavigationThrottle::CANCEL) {
239 controller()->Cancel(); 239 controller()->Cancel();
240 } else if (result == NavigationThrottle::BLOCK_RESPONSE) {
241 // TODO(mkwst): Replace this with something more specific, as the error
242 // page for this code is meant for use with extensions.
243 controller()->CancelWithError(net::ERR_BLOCKED_BY_CLIENT);
240 } else { 244 } else {
241 controller()->Resume(); 245 controller()->Resume();
242 } 246 }
243 } 247 }
244 248
245 } // namespace content 249 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698