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

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

Issue 2345463002: Fix PingLoader to omit credentials for cross-origin violation reports (Closed)
Patch Set: Rebase 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 bool sendPingCommon(LocalFrame* frame, 410 bool sendPingCommon(LocalFrame* frame,
411 ResourceRequest& request, 411 ResourceRequest& request,
412 const AtomicString& initiator, 412 const AtomicString& initiator,
413 StoredCredentials credentialsAllowed, 413 StoredCredentials credentialsAllowed,
414 bool isBeacon) { 414 bool isBeacon) {
415 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) 415 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url()))
416 return false; 416 return false;
417 417
418 // The loader keeps itself alive until it receives a response and disposes 418 // The loader keeps itself alive until it receives a response and disposes
419 // itself. 419 // itself.
420 PingLoaderImpl* loader = new PingLoaderImpl(frame, request, initiator, 420 PingLoaderImpl* loader =
421 AllowStoredCredentials, true); 421 new PingLoaderImpl(frame, request, initiator, credentialsAllowed, true);
422 DCHECK(loader); 422 DCHECK(loader);
423 423
424 return true; 424 return true;
425 } 425 }
426 426
427 bool sendBeaconCommon(LocalFrame* frame, 427 bool sendBeaconCommon(LocalFrame* frame,
428 int allowance, 428 int allowance,
429 const KURL& url, 429 const KURL& url,
430 const Beacon& beacon, 430 const Beacon& beacon,
431 int& payloadLength) { 431 int& payloadLength) {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 bool PingLoader::sendBeacon(LocalFrame* frame, 552 bool PingLoader::sendBeacon(LocalFrame* frame,
553 int allowance, 553 int allowance,
554 const KURL& beaconURL, 554 const KURL& beaconURL,
555 Blob* data, 555 Blob* data,
556 int& payloadLength) { 556 int& payloadLength) {
557 BeaconBlob beacon(data); 557 BeaconBlob beacon(data);
558 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); 558 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength);
559 } 559 }
560 560
561 } // namespace blink 561 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698