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

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

Issue 1318333002: [DevTools] Fix variable shadowing in InspectorResourceAgent. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 visitor->trace(m_replayXHRs); 364 visitor->trace(m_replayXHRs);
365 visitor->trace(m_replayXHRsToBeDeleted); 365 visitor->trace(m_replayXHRsToBeDeleted);
366 visitor->trace(m_pendingXHRReplayData); 366 visitor->trace(m_pendingXHRReplayData);
367 InspectorBaseAgent::trace(visitor); 367 InspectorBaseAgent::trace(visitor);
368 } 368 }
369 369
370 bool InspectorResourceAgent::shouldBlockRequest(LocalFrame* frame, const Resourc eRequest& request, DocumentLoader* loader, const FetchInitiatorInfo& initiatorIn fo) 370 bool InspectorResourceAgent::shouldBlockRequest(LocalFrame* frame, const Resourc eRequest& request, DocumentLoader* loader, const FetchInitiatorInfo& initiatorIn fo)
371 { 371 {
372 String url = request.url().string(); 372 String url = request.url().string();
373 RefPtr<JSONObject> blockedURLs = m_state->getObject(ResourceAgentState::bloc kedURLs); 373 RefPtr<JSONObject> blockedURLs = m_state->getObject(ResourceAgentState::bloc kedURLs);
374 for (const auto& blocked : *blockedURLs) { 374 for (const auto& entry : *blockedURLs) {
375 if (url.contains(blocked.key)) { 375 if (url.contains(entry.key)) {
376 unsigned long identifier = createUniqueIdentifier(); 376 unsigned long identifier = createUniqueIdentifier();
377 willSendRequestInternal(frame, identifier, loader, request, Resource Response(), initiatorInfo); 377 willSendRequestInternal(frame, identifier, loader, request, Resource Response(), initiatorInfo);
378 378
379 String requestId = IdentifiersFactory::requestId(identifier); 379 String requestId = IdentifiersFactory::requestId(identifier);
380 bool blocked = true; 380 bool blocked = true;
381 frontend()->loadingFailed(requestId, monotonicallyIncreasingTime(), InspectorPageAgent::resourceTypeJson(m_resourcesData->resourceType(requestId)), String(), nullptr, &blocked); 381 frontend()->loadingFailed(requestId, monotonicallyIncreasingTime(), InspectorPageAgent::resourceTypeJson(m_resourcesData->resourceType(requestId)), String(), nullptr, &blocked);
382 return true; 382 return true;
383 } 383 }
384 } 384 }
385 return false; 385 return false;
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1045 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish edReplayXHRFired) 1045 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish edReplayXHRFired)
1046 { 1046 {
1047 } 1047 }
1048 1048
1049 bool InspectorResourceAgent::shouldForceCORSPreflight() 1049 bool InspectorResourceAgent::shouldForceCORSPreflight()
1050 { 1050 {
1051 return m_state->getBoolean(ResourceAgentState::cacheDisabled); 1051 return m_state->getBoolean(ResourceAgentState::cacheDisabled);
1052 } 1052 }
1053 1053
1054 } // namespace blink 1054 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698