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

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

Issue 2578983002: Loading: move V8DOMActivityLogger dependency from core/fetch (Closed)
Patch Set: merge 2572373003/#ps20001 Created 4 years 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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 m_corsMode(IsCORSEnabled) { 242 m_corsMode(IsCORSEnabled) {
243 const AtomicString contentType = request.httpContentType(); 243 const AtomicString contentType = request.httpContentType();
244 if (!contentType.isNull() && 244 if (!contentType.isNull() &&
245 FetchUtils::isSimpleHeader(AtomicString("content-type"), contentType)) 245 FetchUtils::isSimpleHeader(AtomicString("content-type"), contentType))
246 m_corsMode = NotCORSEnabled; 246 m_corsMode = NotCORSEnabled;
247 247
248 frame->loader().client()->didDispatchPingLoader(request.url()); 248 frame->loader().client()->didDispatchPingLoader(request.url());
249 249
250 FetchContext& fetchContext = frame->document()->fetcher()->context(); 250 FetchContext& fetchContext = frame->document()->fetcher()->context();
251 251
252 fetchContext.willStartLoadingResource(m_identifier, request, Resource::Image); 252 fetchContext.willStartLoadingResource(m_identifier, request, Resource::Image,
253 initiator, false);
253 254
254 FetchInitiatorInfo initiatorInfo; 255 FetchInitiatorInfo initiatorInfo;
255 initiatorInfo.name = initiator; 256 initiatorInfo.name = initiator;
256 fetchContext.dispatchWillSendRequest(m_identifier, request, 257 fetchContext.dispatchWillSendRequest(m_identifier, request,
257 ResourceResponse(), initiatorInfo); 258 ResourceResponse(), initiatorInfo);
258 259
259 // Make sure the scheduler doesn't wait for the ping. 260 // Make sure the scheduler doesn't wait for the ping.
260 if (frame->frameScheduler()) 261 if (frame->frameScheduler())
261 frame->frameScheduler()->didStopLoading(m_identifier); 262 frame->frameScheduler()->didStopLoading(m_identifier);
262 263
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 bool PingLoader::sendBeacon(LocalFrame* frame, 553 bool PingLoader::sendBeacon(LocalFrame* frame,
553 int allowance, 554 int allowance,
554 const KURL& beaconURL, 555 const KURL& beaconURL,
555 Blob* data, 556 Blob* data,
556 int& payloadLength) { 557 int& payloadLength) {
557 BeaconBlob beacon(data); 558 BeaconBlob beacon(data);
558 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength); 559 return sendBeaconCommon(frame, allowance, beaconURL, beacon, payloadLength);
559 } 560 }
560 561
561 } // namespace blink 562 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698