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

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

Issue 2816403002: test all
Patch Set: fix sharedworker 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
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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 identifier_, passed_new_request.ToMutableResourceRequest(), 340 identifier_, passed_new_request.ToMutableResourceRequest(),
341 passed_redirect_response.ToResourceResponse(), initiator_info); 341 passed_redirect_response.ToResourceResponse(), initiator_info);
342 } 342 }
343 343
344 return true; 344 return true;
345 } 345 }
346 346
347 void PingLoaderImpl::DidReceiveResponse(const WebURLResponse& response) { 347 void PingLoaderImpl::DidReceiveResponse(const WebURLResponse& response) {
348 if (GetFrame()) { 348 if (GetFrame()) {
349 const ResourceResponse& resource_response = response.ToResourceResponse(); 349 const ResourceResponse& resource_response = response.ToResourceResponse();
350 probe::didReceiveResourceResponse(GetFrame(), identifier_, 0, 350 probe::didReceiveResourceResponse(GetFrame()->GetDocument(), identifier_, 0,
351 resource_response, 0); 351 resource_response, 0);
352 DidFailLoading(GetFrame()); 352 DidFailLoading(GetFrame());
353 } 353 }
354 Dispose(); 354 Dispose();
355 } 355 }
356 356
357 void PingLoaderImpl::DidReceiveData(const char*, int data_length) { 357 void PingLoaderImpl::DidReceiveData(const char*, int data_length) {
358 if (GetFrame()) 358 if (GetFrame())
359 DidFailLoading(GetFrame()); 359 DidFailLoading(GetFrame());
360 Dispose(); 360 Dispose();
(...skipping 15 matching lines...) Expand all
376 Dispose(); 376 Dispose();
377 } 377 }
378 378
379 void PingLoaderImpl::Timeout(TimerBase*) { 379 void PingLoaderImpl::Timeout(TimerBase*) {
380 if (GetFrame()) 380 if (GetFrame())
381 DidFailLoading(GetFrame()); 381 DidFailLoading(GetFrame());
382 Dispose(); 382 Dispose();
383 } 383 }
384 384
385 void PingLoaderImpl::DidFailLoading(LocalFrame* frame) { 385 void PingLoaderImpl::DidFailLoading(LocalFrame* frame) {
386 probe::didFailLoading(frame, identifier_, 386 probe::didFailLoading(frame->GetDocument(), identifier_,
387 ResourceError::CancelledError(url_)); 387 ResourceError::CancelledError(url_));
388 frame->Console().DidFailLoading(identifier_, 388 frame->Console().DidFailLoading(identifier_,
389 ResourceError::CancelledError(url_)); 389 ResourceError::CancelledError(url_));
390 } 390 }
391 391
392 DEFINE_TRACE(PingLoaderImpl) { 392 DEFINE_TRACE(PingLoaderImpl) {
393 ContextClient::Trace(visitor); 393 ContextClient::Trace(visitor);
394 } 394 }
395 395
396 void FinishPingRequestInitialization( 396 void FinishPingRequestInitialization(
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 bool PingLoader::SendBeacon(LocalFrame* frame, 582 bool PingLoader::SendBeacon(LocalFrame* frame,
583 int allowance, 583 int allowance,
584 const KURL& beacon_url, 584 const KURL& beacon_url,
585 Blob* data, 585 Blob* data,
586 size_t& beacon_size) { 586 size_t& beacon_size) {
587 BeaconBlob beacon(data); 587 BeaconBlob beacon(data);
588 return SendBeaconCommon(frame, allowance, beacon_url, beacon, beacon_size); 588 return SendBeaconCommon(frame, allowance, beacon_url, beacon, beacon_size);
589 } 589 }
590 590
591 } // namespace blink 591 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameLoader.cpp ('k') | third_party/WebKit/Source/core/loader/ThreadableLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698