| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 InspectorInstrumentation::markResourceAsCached(frame(), identifier); | 387 InspectorInstrumentation::markResourceAsCached(frame(), identifier); |
| 388 if (!resource->response().isNull()) | 388 if (!resource->response().isNull()) |
| 389 dispatchDidReceiveResponseInternal(identifier, resource->response(), fra
meType, requestContext, resource, LinkLoader::DoNotLoadResources); | 389 dispatchDidReceiveResponseInternal(identifier, resource->response(), fra
meType, requestContext, resource, LinkLoader::DoNotLoadResources); |
| 390 | 390 |
| 391 if (resource->encodedSize() > 0) | 391 if (resource->encodedSize() > 0) |
| 392 dispatchDidReceiveData(identifier, 0, resource->encodedSize(), 0); | 392 dispatchDidReceiveData(identifier, 0, resource->encodedSize(), 0); |
| 393 | 393 |
| 394 dispatchDidFinishLoading(identifier, 0, 0); | 394 dispatchDidFinishLoading(identifier, 0, 0); |
| 395 } | 395 } |
| 396 | 396 |
| 397 bool FrameFetchContext::shouldLoadNewResource(Resource::Type type) const | 397 bool FrameFetchContext::shouldLoadNewResource(Resource::Type type, const WebURLR
equest::FrameType frameType) const |
| 398 { | 398 { |
| 399 if (!m_documentLoader) | 399 if (!m_documentLoader) |
| 400 return true; | 400 return true; |
| 401 if (type == Resource::MainResource) | 401 if (type == Resource::MainResource && frameType != WebURLRequest::FrameTypeP
reload) |
| 402 return m_documentLoader == frame()->loader().provisionalDocumentLoader()
; | 402 return m_documentLoader == frame()->loader().provisionalDocumentLoader()
; |
| 403 return m_documentLoader == frame()->loader().documentLoader(); | 403 return m_documentLoader == frame()->loader().documentLoader(); |
| 404 } | 404 } |
| 405 | 405 |
| 406 static std::unique_ptr<TracedValue> loadResourceTraceData(unsigned long identifi
er, const KURL& url, int priority) | 406 static std::unique_ptr<TracedValue> loadResourceTraceData(unsigned long identifi
er, const KURL& url, int priority) |
| 407 { | 407 { |
| 408 String requestId = IdentifiersFactory::requestId(identifier); | 408 String requestId = IdentifiersFactory::requestId(identifier); |
| 409 | 409 |
| 410 std::unique_ptr<TracedValue> value = TracedValue::create(); | 410 std::unique_ptr<TracedValue> value = TracedValue::create(); |
| 411 value->setString("requestId", requestId); | 411 value->setString("requestId", requestId); |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 } | 831 } |
| 832 | 832 |
| 833 DEFINE_TRACE(FrameFetchContext) | 833 DEFINE_TRACE(FrameFetchContext) |
| 834 { | 834 { |
| 835 visitor->trace(m_document); | 835 visitor->trace(m_document); |
| 836 visitor->trace(m_documentLoader); | 836 visitor->trace(m_documentLoader); |
| 837 FetchContext::trace(visitor); | 837 FetchContext::trace(visitor); |
| 838 } | 838 } |
| 839 | 839 |
| 840 } // namespace blink | 840 } // namespace blink |
| OLD | NEW |