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

Side by Side Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 415013003: Oilpan: Prepare moving XHRReplayData to Oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 disable(&error); 294 disable(&error);
295 } 295 }
296 ASSERT(!m_instrumentingAgents->inspectorResourceAgent()); 296 ASSERT(!m_instrumentingAgents->inspectorResourceAgent());
297 #endif 297 #endif
298 } 298 }
299 299
300 void InspectorResourceAgent::trace(Visitor* visitor) 300 void InspectorResourceAgent::trace(Visitor* visitor)
301 { 301 {
302 visitor->trace(m_pageAgent); 302 visitor->trace(m_pageAgent);
303 #if ENABLE(OILPAN) 303 #if ENABLE(OILPAN)
304 visitor->trace(m_pendingXHRReplayData);
304 visitor->trace(m_replayXHRs); 305 visitor->trace(m_replayXHRs);
305 visitor->trace(m_replayXHRsToBeDeleted); 306 visitor->trace(m_replayXHRsToBeDeleted);
306 #endif 307 #endif
307 InspectorBaseAgent::trace(visitor); 308 InspectorBaseAgent::trace(visitor);
308 } 309 }
309 310
310 void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentL oader* loader, ResourceRequest& request, const ResourceResponse& redirectRespons e, const FetchInitiatorInfo& initiatorInfo) 311 void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentL oader* loader, ResourceRequest& request, const ResourceResponse& redirectRespons e, const FetchInitiatorInfo& initiatorInfo)
311 { 312 {
312 // Ignore the request initiated internally. 313 // Ignore the request initiated internally.
313 if (initiatorInfo.name == FetchInitiatorTypeNames::internal) 314 if (initiatorInfo.name == FetchInitiatorTypeNames::internal)
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 474
474 m_resourcesData->setResourceType(IdentifiersFactory::requestId(identifier), InspectorPageAgent::XHRResource); 475 m_resourcesData->setResourceType(IdentifiersFactory::requestId(identifier), InspectorPageAgent::XHRResource);
475 XHRReplayData* xhrReplayData = it->value.get(); 476 XHRReplayData* xhrReplayData = it->value.get();
476 String requestId = IdentifiersFactory::requestId(identifier); 477 String requestId = IdentifiersFactory::requestId(identifier);
477 m_resourcesData->setXHRReplayData(requestId, xhrReplayData); 478 m_resourcesData->setXHRReplayData(requestId, xhrReplayData);
478 } 479 }
479 480
480 void InspectorResourceAgent::willLoadXHR(XMLHttpRequest* xhr, ThreadableLoaderCl ient* client, const AtomicString& method, const KURL& url, bool async, FormData* formData, const HTTPHeaderMap& headers, bool includeCredentials) 481 void InspectorResourceAgent::willLoadXHR(XMLHttpRequest* xhr, ThreadableLoaderCl ient* client, const AtomicString& method, const KURL& url, bool async, FormData* formData, const HTTPHeaderMap& headers, bool includeCredentials)
481 { 482 {
482 ASSERT(xhr); 483 ASSERT(xhr);
483 RefPtr<XHRReplayData> xhrReplayData = XHRReplayData::create(xhr->executionCo ntext(), method, urlWithoutFragment(url), async, formData, includeCredentials); 484 RefPtrWillBeRawPtr<XHRReplayData> xhrReplayData = XHRReplayData::create(xhr- >executionContext(), method, urlWithoutFragment(url), async, formData, includeCr edentials);
484 HTTPHeaderMap::const_iterator end = headers.end(); 485 HTTPHeaderMap::const_iterator end = headers.end();
485 for (HTTPHeaderMap::const_iterator it = headers.begin(); it!= end; ++it) 486 for (HTTPHeaderMap::const_iterator it = headers.begin(); it!= end; ++it)
486 xhrReplayData->addHeader(it->key, it->value); 487 xhrReplayData->addHeader(it->key, it->value);
487 m_pendingXHRReplayData.set(client, xhrReplayData); 488 m_pendingXHRReplayData.set(client, xhrReplayData);
488 } 489 }
489 490
490 void InspectorResourceAgent::delayedRemoveReplayXHR(XMLHttpRequest* xhr) 491 void InspectorResourceAgent::delayedRemoveReplayXHR(XMLHttpRequest* xhr)
491 { 492 {
492 if (!m_replayXHRs.contains(xhr)) 493 if (!m_replayXHRs.contains(xhr))
493 return; 494 return;
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 : InspectorBaseAgent<InspectorResourceAgent>("Network") 876 : InspectorBaseAgent<InspectorResourceAgent>("Network")
876 , m_pageAgent(pageAgent) 877 , m_pageAgent(pageAgent)
877 , m_frontend(0) 878 , m_frontend(0)
878 , m_resourcesData(adoptPtr(new NetworkResourcesData())) 879 , m_resourcesData(adoptPtr(new NetworkResourcesData()))
879 , m_isRecalculatingStyle(false) 880 , m_isRecalculatingStyle(false)
880 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish edReplayXHRFired) 881 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish edReplayXHRFired)
881 { 882 {
882 } 883 }
883 884
884 } // namespace blink 885 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.h ('k') | Source/core/inspector/NetworkResourcesData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698