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

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

Issue 2327643003: Replace ASSERT*() with DCHECK*() in core/fetch/ and core/loader/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } 394 }
395 395
396 bool sendPingCommon(LocalFrame* frame, ResourceRequest& request, const AtomicStr ing& initiator, StoredCredentials credentialsAllowed, bool isBeacon) 396 bool sendPingCommon(LocalFrame* frame, ResourceRequest& request, const AtomicStr ing& initiator, StoredCredentials credentialsAllowed, bool isBeacon)
397 { 397 {
398 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url())) 398 if (MixedContentChecker::shouldBlockFetch(frame, request, request.url()))
399 return false; 399 return false;
400 400
401 // The loader keeps itself alive until it receives a response and disposes i tself. 401 // The loader keeps itself alive until it receives a response and disposes i tself.
402 PingLoaderImpl* loader = new PingLoaderImpl(frame, request, initiator, Allow StoredCredentials, true); 402 PingLoaderImpl* loader = new PingLoaderImpl(frame, request, initiator, Allow StoredCredentials, true);
403 DCHECK(loader); 403 DCHECK(loader);
404 ALLOW_UNUSED_LOCAL(loader);
405 404
406 return true; 405 return true;
407 } 406 }
408 407
409 bool sendBeaconCommon(LocalFrame* frame, int allowance, const KURL& url, const B eacon& beacon, int& payloadLength) 408 bool sendBeaconCommon(LocalFrame* frame, int allowance, const KURL& url, const B eacon& beacon, int& payloadLength)
410 { 409 {
411 if (!frame->document()) 410 if (!frame->document())
412 return false; 411 return false;
413 412
414 unsigned long long entitySize = beacon.size(); 413 unsigned long long entitySize = beacon.size();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); 495 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength);
497 } 496 }
498 497
499 bool PingLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beacon URL, Blob* data, int& payloadLength) 498 bool PingLoader::sendBeacon(LocalFrame* frame, int allowance, const KURL& beacon URL, Blob* data, int& payloadLength)
500 { 499 {
501 BeaconBlob beacon(data); 500 BeaconBlob beacon(data);
502 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); 501 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength);
503 } 502 }
504 503
505 } // namespace blink 504 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698