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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2425663002: Add an error page for resources blocked via XSS Auditor. (Closed)
Patch Set: Created 4 years, 2 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after
2026 // unreachableURL informs FrameLoader::reload to load unreachableURL 2026 // unreachableURL informs FrameLoader::reload to load unreachableURL
2027 // instead of the currently loaded URL. 2027 // instead of the currently loaded URL.
2028 ResourceRequest request; 2028 ResourceRequest request;
2029 if (replace && !unreachableURL.isEmpty() && 2029 if (replace && !unreachableURL.isEmpty() &&
2030 frame()->loader().provisionalDocumentLoader()) 2030 frame()->loader().provisionalDocumentLoader())
2031 request = frame()->loader().provisionalDocumentLoader()->originalRequest(); 2031 request = frame()->loader().provisionalDocumentLoader()->originalRequest();
2032 request.setURL(baseURL); 2032 request.setURL(baseURL);
2033 request.setCheckForBrowserSideNavigation(false); 2033 request.setCheckForBrowserSideNavigation(false);
2034 2034
2035 FrameLoadRequest frameRequest( 2035 FrameLoadRequest frameRequest(
2036 0, request, SubstituteData(data, mimeType, textEncoding, unreachableURL)); 2036 0, request, SubstituteData(data, mimeType, textEncoding, unreachableURL,
2037 ForceSynchronousLoad));
2037 DCHECK(frameRequest.substituteData().isValid()); 2038 DCHECK(frameRequest.substituteData().isValid());
2038 frameRequest.setReplacesCurrentItem(replace); 2039 frameRequest.setReplacesCurrentItem(replace);
2039 if (isClientRedirect) 2040 if (isClientRedirect)
2040 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect); 2041 frameRequest.setClientRedirect(ClientRedirectPolicy::ClientRedirect);
2041 2042
2042 HistoryItem* historyItem = item; 2043 HistoryItem* historyItem = item;
2043 frame()->loader().load( 2044 frame()->loader().load(
2044 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem, 2045 frameRequest, static_cast<FrameLoadType>(webFrameLoadType), historyItem,
2045 static_cast<HistoryLoadType>(webHistoryLoadType)); 2046 static_cast<HistoryLoadType>(webHistoryLoadType));
2046 } 2047 }
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2374 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2375 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2375 } else if (metric == "wasAlternateProtocolAvailable") { 2376 } else if (metric == "wasAlternateProtocolAvailable") {
2376 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2377 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2377 } else if (metric == "connectionInfo") { 2378 } else if (metric == "connectionInfo") {
2378 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2379 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2379 } 2380 }
2380 UseCounter::count(frame(), feature); 2381 UseCounter::count(frame(), feature);
2381 } 2382 }
2382 2383
2383 } // namespace blink 2384 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698