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

Side by Side Diff: content/browser/frame_host/ancestor_throttle.cc

Issue 2830353003: Tracing for NavigationHandle lifetime and state. (Closed)
Patch Set: Rebase. Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/frame_host/ancestor_throttle.h" 5 #include "content/browser/frame_host/ancestor_throttle.h"
6 6
7 #include "base/metrics/histogram_macros.h" 7 #include "base/metrics/histogram_macros.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 RecordXFrameOptionsUsage(BYPASS); 160 RecordXFrameOptionsUsage(BYPASS);
161 return NavigationThrottle::PROCEED; 161 return NavigationThrottle::PROCEED;
162 case HeaderDisposition::ALLOWALL: 162 case HeaderDisposition::ALLOWALL:
163 RecordXFrameOptionsUsage(ALLOWALL); 163 RecordXFrameOptionsUsage(ALLOWALL);
164 return NavigationThrottle::PROCEED; 164 return NavigationThrottle::PROCEED;
165 } 165 }
166 NOTREACHED(); 166 NOTREACHED();
167 return NavigationThrottle::BLOCK_RESPONSE; 167 return NavigationThrottle::BLOCK_RESPONSE;
168 } 168 }
169 169
170 const char* AncestorThrottle::GetNameForLogging() {
171 return "AncestorThrottle";
172 }
173
170 NavigationThrottle::ThrottleCheckResult 174 NavigationThrottle::ThrottleCheckResult
171 AncestorThrottle::CheckContentSecurityPolicyFrameSrc(bool is_redirect) { 175 AncestorThrottle::CheckContentSecurityPolicyFrameSrc(bool is_redirect) {
172 // If PlzNavigate is enabled, "frame-src" is enforced on the browser side, 176 // If PlzNavigate is enabled, "frame-src" is enforced on the browser side,
173 // else on the renderer side. 177 // else on the renderer side.
174 if (!IsBrowserSideNavigationEnabled()) 178 if (!IsBrowserSideNavigationEnabled())
175 return NavigationThrottle::PROCEED; 179 return NavigationThrottle::PROCEED;
176 180
177 const GURL& url = navigation_handle()->GetURL(); 181 const GURL& url = navigation_handle()->GetURL();
178 if (url.SchemeIs(url::kAboutScheme)) 182 if (url.SchemeIs(url::kAboutScheme))
179 return NavigationThrottle::PROCEED; 183 return NavigationThrottle::PROCEED;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 HeadersContainFrameAncestorsCSP(headers)) { 305 HeadersContainFrameAncestorsCSP(headers)) {
302 // TODO(mkwst): 'frame-ancestors' is currently handled in Blink. We should 306 // TODO(mkwst): 'frame-ancestors' is currently handled in Blink. We should
303 // handle it here instead. Until then, don't block the request, and let 307 // handle it here instead. Until then, don't block the request, and let
304 // Blink handle it. https://crbug.com/555418 308 // Blink handle it. https://crbug.com/555418
305 return HeaderDisposition::BYPASS; 309 return HeaderDisposition::BYPASS;
306 } 310 }
307 return result; 311 return result;
308 } 312 }
309 313
310 } // namespace content 314 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/ancestor_throttle.h ('k') | content/browser/frame_host/data_url_navigation_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698