| 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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 request.setHTTPHeaderField(AtomicString(header.first), | 630 request.setHTTPHeaderField(AtomicString(header.first), |
| 631 AtomicString(value)); | 631 AtomicString(value)); |
| 632 } | 632 } |
| 633 } | 633 } |
| 634 | 634 |
| 635 request.setReportRawHeaders(true); | 635 request.setReportRawHeaders(true); |
| 636 | 636 |
| 637 if (m_state->booleanProperty(NetworkAgentState::cacheDisabled, false)) { | 637 if (m_state->booleanProperty(NetworkAgentState::cacheDisabled, false)) { |
| 638 // It shouldn't be a ReturnCacheDataDontLoad request as those are blocked | 638 // It shouldn't be a ReturnCacheDataDontLoad request as those are blocked |
| 639 // in shouldBlockRequest. | 639 // in shouldBlockRequest. |
| 640 DCHECK_NE(WebCachePolicy::ReturnCacheDataDontLoad, | 640 // TODO(shaochuan): Cache-aware loading will be deactivated in |
| 641 request.getCachePolicy()); | 641 // setCachePolicy() if activated here. crbug.com/632580 |
| 642 DCHECK(request.isCacheAwareLoadingActivated() || |
| 643 WebCachePolicy::ReturnCacheDataDontLoad != request.getCachePolicy()); |
| 642 request.setCachePolicy(WebCachePolicy::BypassingCache); | 644 request.setCachePolicy(WebCachePolicy::BypassingCache); |
| 643 request.setShouldResetAppCache(true); | 645 request.setShouldResetAppCache(true); |
| 644 } | 646 } |
| 645 if (m_state->booleanProperty(NetworkAgentState::bypassServiceWorker, false)) | 647 if (m_state->booleanProperty(NetworkAgentState::bypassServiceWorker, false)) |
| 646 request.setSkipServiceWorker(WebURLRequest::SkipServiceWorker::All); | 648 request.setSkipServiceWorker(WebURLRequest::SkipServiceWorker::All); |
| 647 | 649 |
| 648 willSendRequestInternal(frame, identifier, loader, request, redirectResponse, | 650 willSendRequestInternal(frame, identifier, loader, request, redirectResponse, |
| 649 initiatorInfo); | 651 initiatorInfo); |
| 650 | 652 |
| 651 if (!m_hostId.isEmpty()) | 653 if (!m_hostId.isEmpty()) |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 m_isRecalculatingStyle(false), | 1443 m_isRecalculatingStyle(false), |
| 1442 m_removeFinishedReplayXHRTimer( | 1444 m_removeFinishedReplayXHRTimer( |
| 1443 this, | 1445 this, |
| 1444 &InspectorNetworkAgent::removeFinishedReplayXHRFired) {} | 1446 &InspectorNetworkAgent::removeFinishedReplayXHRFired) {} |
| 1445 | 1447 |
| 1446 bool InspectorNetworkAgent::shouldForceCORSPreflight() { | 1448 bool InspectorNetworkAgent::shouldForceCORSPreflight() { |
| 1447 return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false); | 1449 return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false); |
| 1448 } | 1450 } |
| 1449 | 1451 |
| 1450 } // namespace blink | 1452 } // namespace blink |
| OLD | NEW |