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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 class InspectorThreadableLoaderClient final : public ThreadableLoaderClient { | 98 class InspectorThreadableLoaderClient final : public ThreadableLoaderClient { |
99 WTF_MAKE_NONCOPYABLE(InspectorThreadableLoaderClient); | 99 WTF_MAKE_NONCOPYABLE(InspectorThreadableLoaderClient); |
100 public: | 100 public: |
101 InspectorThreadableLoaderClient(PassRefPtrWillBeRawPtr<LoadResourceForFronte
ndCallback> callback) | 101 InspectorThreadableLoaderClient(PassRefPtrWillBeRawPtr<LoadResourceForFronte
ndCallback> callback) |
102 : m_callback(callback) | 102 : m_callback(callback) |
103 , m_statusCode(0) { } | 103 , m_statusCode(0) { } |
104 | 104 |
105 virtual ~InspectorThreadableLoaderClient() { } | 105 virtual ~InspectorThreadableLoaderClient() { } |
106 | 106 |
107 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse& response) override | 107 virtual void didReceiveResponse(unsigned long identifier, const ResourceResp
onse& response, PassOwnPtr<WebDataConsumerHandle> handle) override |
108 { | 108 { |
| 109 ASSERT_UNUSED(handle, !handle); |
109 WTF::TextEncoding textEncoding(response.textEncodingName()); | 110 WTF::TextEncoding textEncoding(response.textEncodingName()); |
110 bool useDetector = false; | 111 bool useDetector = false; |
111 if (!textEncoding.isValid()) { | 112 if (!textEncoding.isValid()) { |
112 textEncoding = UTF8Encoding(); | 113 textEncoding = UTF8Encoding(); |
113 useDetector = true; | 114 useDetector = true; |
114 } | 115 } |
115 m_decoder = TextResourceDecoder::create("text/plain", textEncoding, useD
etector); | 116 m_decoder = TextResourceDecoder::create("text/plain", textEncoding, useD
etector); |
116 m_statusCode = response.httpStatusCode(); | 117 m_statusCode = response.httpStatusCode(); |
117 m_responseHeaders = response.httpHeaderFields(); | 118 m_responseHeaders = response.httpHeaderFields(); |
118 } | 119 } |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish
edReplayXHRFired) | 894 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish
edReplayXHRFired) |
894 { | 895 { |
895 } | 896 } |
896 | 897 |
897 bool InspectorResourceAgent::shouldForceCORSPreflight() | 898 bool InspectorResourceAgent::shouldForceCORSPreflight() |
898 { | 899 { |
899 return m_state->getBoolean(ResourceAgentState::cacheDisabled); | 900 return m_state->getBoolean(ResourceAgentState::cacheDisabled); |
900 } | 901 } |
901 | 902 |
902 } // namespace blink | 903 } // namespace blink |
OLD | NEW |