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

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

Issue 2900613002: Support DevTools for off-main-thread-fetch (Closed)
Patch Set: incorporated dgozman's comment Created 3 years, 5 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 identifier_, passed_new_request.ToMutableResourceRequest(), 357 identifier_, passed_new_request.ToMutableResourceRequest(),
358 passed_redirect_response.ToResourceResponse(), initiator_info); 358 passed_redirect_response.ToResourceResponse(), initiator_info);
359 } 359 }
360 360
361 return true; 361 return true;
362 } 362 }
363 363
364 void PingLoaderImpl::DidReceiveResponse(const WebURLResponse& response) { 364 void PingLoaderImpl::DidReceiveResponse(const WebURLResponse& response) {
365 if (GetFrame()) { 365 if (GetFrame()) {
366 const ResourceResponse& resource_response = response.ToResourceResponse(); 366 const ResourceResponse& resource_response = response.ToResourceResponse();
367 probe::didReceiveResourceResponse(GetFrame(), identifier_, 0, 367 probe::didReceiveResourceResponse(GetFrame()->GetDocument(), identifier_, 0,
368 resource_response, 0); 368 resource_response, 0);
369 DidFailLoading(GetFrame()); 369 DidFailLoading(GetFrame());
370 } 370 }
371 Dispose(); 371 Dispose();
372 } 372 }
373 373
374 void PingLoaderImpl::DidReceiveData(const char*, int data_length) { 374 void PingLoaderImpl::DidReceiveData(const char*, int data_length) {
375 if (GetFrame()) 375 if (GetFrame())
376 DidFailLoading(GetFrame()); 376 DidFailLoading(GetFrame());
377 Dispose(); 377 Dispose();
(...skipping 17 matching lines...) Expand all
395 Dispose(); 395 Dispose();
396 } 396 }
397 397
398 void PingLoaderImpl::Timeout(TimerBase*) { 398 void PingLoaderImpl::Timeout(TimerBase*) {
399 if (GetFrame()) 399 if (GetFrame())
400 DidFailLoading(GetFrame()); 400 DidFailLoading(GetFrame());
401 Dispose(); 401 Dispose();
402 } 402 }
403 403
404 void PingLoaderImpl::DidFailLoading(LocalFrame* frame) { 404 void PingLoaderImpl::DidFailLoading(LocalFrame* frame) {
405 probe::didFailLoading(frame, identifier_, 405 probe::didFailLoading(frame->GetDocument(), identifier_,
406 ResourceError::CancelledError(url_)); 406 ResourceError::CancelledError(url_));
407 frame->Console().DidFailLoading(identifier_, 407 frame->Console().DidFailLoading(identifier_,
408 ResourceError::CancelledError(url_)); 408 ResourceError::CancelledError(url_));
409 } 409 }
410 410
411 DEFINE_TRACE(PingLoaderImpl) { 411 DEFINE_TRACE(PingLoaderImpl) {
412 ContextClient::Trace(visitor); 412 ContextClient::Trace(visitor);
413 } 413 }
414 414
415 void FinishPingRequestInitialization( 415 void FinishPingRequestInitialization(
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 bool PingLoader::SendBeacon(LocalFrame* frame, 587 bool PingLoader::SendBeacon(LocalFrame* frame,
588 int allowance, 588 int allowance,
589 const KURL& beacon_url, 589 const KURL& beacon_url,
590 Blob* data, 590 Blob* data,
591 size_t& beacon_size) { 591 size_t& beacon_size) {
592 BeaconBlob beacon(data); 592 BeaconBlob beacon(data);
593 return SendBeaconCommon(frame, allowance, beacon_url, beacon, beacon_size); 593 return SendBeaconCommon(frame, allowance, beacon_url, beacon, beacon_size);
594 } 594 }
595 595
596 } // namespace blink 596 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698