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 2649923007: Revert of Show service worker navigation preload requests in DevTools Network tab (Closed)
Patch Set: Created 3 years, 10 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 return true; 343 return true;
344 } 344 }
345 345
346 void PingLoaderImpl::didReceiveResponse(const WebURLResponse& response) { 346 void PingLoaderImpl::didReceiveResponse(const WebURLResponse& response) {
347 if (frame()) { 347 if (frame()) {
348 TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data", 348 TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
349 InspectorResourceFinishEvent::data(m_identifier, 0, true, 0)); 349 InspectorResourceFinishEvent::data(m_identifier, 0, true, 0));
350 const ResourceResponse& resourceResponse = response.toResourceResponse(); 350 const ResourceResponse& resourceResponse = response.toResourceResponse();
351 InspectorInstrumentation::didReceiveResourceResponse( 351 InspectorInstrumentation::didReceiveResourceResponse(
352 frame()->document(), m_identifier, 0, resourceResponse, 0); 352 frame(), m_identifier, 0, resourceResponse, 0);
353 didFailLoading(frame()); 353 didFailLoading(frame());
354 } 354 }
355 dispose(); 355 dispose();
356 } 356 }
357 357
358 void PingLoaderImpl::didReceiveData(const char*, int dataLength) { 358 void PingLoaderImpl::didReceiveData(const char*, int dataLength) {
359 if (frame()) { 359 if (frame()) {
360 TRACE_EVENT1( 360 TRACE_EVENT1(
361 "devtools.timeline", "ResourceFinish", "data", 361 "devtools.timeline", "ResourceFinish", "data",
362 InspectorResourceFinishEvent::data(m_identifier, 0, true, dataLength)); 362 InspectorResourceFinishEvent::data(m_identifier, 0, true, dataLength));
(...skipping 30 matching lines...) Expand all
393 if (frame()) { 393 if (frame()) {
394 TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data", 394 TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
395 InspectorResourceFinishEvent::data(m_identifier, 0, true, 0)); 395 InspectorResourceFinishEvent::data(m_identifier, 0, true, 0));
396 didFailLoading(frame()); 396 didFailLoading(frame());
397 } 397 }
398 dispose(); 398 dispose();
399 } 399 }
400 400
401 void PingLoaderImpl::didFailLoading(LocalFrame* frame) { 401 void PingLoaderImpl::didFailLoading(LocalFrame* frame) {
402 InspectorInstrumentation::didFailLoading( 402 InspectorInstrumentation::didFailLoading(
403 frame->document(), m_identifier, ResourceError::cancelledError(m_url)); 403 frame, m_identifier, ResourceError::cancelledError(m_url));
404 frame->console().didFailLoading(m_identifier, 404 frame->console().didFailLoading(m_identifier,
405 ResourceError::cancelledError(m_url)); 405 ResourceError::cancelledError(m_url));
406 } 406 }
407 407
408 DEFINE_TRACE(PingLoaderImpl) { 408 DEFINE_TRACE(PingLoaderImpl) {
409 ContextClient::trace(visitor); 409 ContextClient::trace(visitor);
410 } 410 }
411 411
412 void finishPingRequestInitialization( 412 void finishPingRequestInitialization(
413 ResourceRequest& request, 413 ResourceRequest& request,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 bool PingLoader::sendBeacon(LocalFrame* frame, 572 bool PingLoader::sendBeacon(LocalFrame* frame,
573 int allowance, 573 int allowance,
574 const KURL& beaconURL, 574 const KURL& beaconURL,
575 Blob* data, 575 Blob* data,
576 int& payloadLength) { 576 int& payloadLength) {
577 BeaconBlob beacon(data); 577 BeaconBlob beacon(data);
578 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); 578 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength);
579 } 579 }
580 580
581 } // namespace blink 581 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698