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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2808753003: Carve out an exception for embedded credentials in XHR. (Closed)
Patch Set: Rebaseline. 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
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/remember-bad-password-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 GetFrame()->GetDocument()->GetSecurityOrigin()->Protocol())) { 826 GetFrame()->GetDocument()->GetSecurityOrigin()->Protocol())) {
827 Deprecation::CountDeprecation( 827 Deprecation::CountDeprecation(
828 GetFrame()->GetDocument(), 828 GetFrame()->GetDocument(),
829 UseCounter::kLegacyProtocolEmbeddedAsSubresource); 829 UseCounter::kLegacyProtocolEmbeddedAsSubresource);
830 830
831 // TODO(mkwst): Enabled by default in M59. Drop the runtime-enabled check 831 // TODO(mkwst): Enabled by default in M59. Drop the runtime-enabled check
832 // in M60: https://www.chromestatus.com/feature/5709390967472128 832 // in M60: https://www.chromestatus.com/feature/5709390967472128
833 if (RuntimeEnabledFeatures::blockLegacySubresourcesEnabled()) 833 if (RuntimeEnabledFeatures::blockLegacySubresourcesEnabled())
834 return ResourceRequestBlockedReason::kOrigin; 834 return ResourceRequestBlockedReason::kOrigin;
835 } 835 }
836 if (!url.User().IsEmpty() || !url.Pass().IsEmpty()) { 836
837 if ((!url.User().IsEmpty() || !url.Pass().IsEmpty()) &&
838 resource_request.GetRequestContext() !=
839 WebURLRequest::kRequestContextXMLHttpRequest) {
837 Deprecation::CountDeprecation( 840 Deprecation::CountDeprecation(
838 GetFrame()->GetDocument(), 841 GetFrame()->GetDocument(),
839 UseCounter::kRequestedSubresourceWithEmbeddedCredentials); 842 UseCounter::kRequestedSubresourceWithEmbeddedCredentials);
840 // TODO(mkwst): Remove the runtime-enabled check in M59: 843 // TODO(mkwst): Remove the runtime-enabled check in M59:
841 // https://www.chromestatus.com/feature/5669008342777856 844 // https://www.chromestatus.com/feature/5669008342777856
842 if (RuntimeEnabledFeatures::blockCredentialedSubresourcesEnabled()) 845 if (RuntimeEnabledFeatures::blockCredentialedSubresourcesEnabled())
843 return ResourceRequestBlockedReason::kOrigin; 846 return ResourceRequestBlockedReason::kOrigin;
844 } 847 }
845 } 848 }
846 849
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 return GetFrame()->FrameScheduler()->LoadingTaskRunner(); 1090 return GetFrame()->FrameScheduler()->LoadingTaskRunner();
1088 } 1091 }
1089 1092
1090 DEFINE_TRACE(FrameFetchContext) { 1093 DEFINE_TRACE(FrameFetchContext) {
1091 visitor->Trace(document_); 1094 visitor->Trace(document_);
1092 visitor->Trace(document_loader_); 1095 visitor->Trace(document_loader_);
1093 FetchContext::Trace(visitor); 1096 FetchContext::Trace(visitor);
1094 } 1097 }
1095 1098
1096 } // namespace blink 1099 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/remember-bad-password-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698