OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |