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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 WTF_MAKE_NONCOPYABLE(InspectorFileReaderLoaderClient); | 104 WTF_MAKE_NONCOPYABLE(InspectorFileReaderLoaderClient); |
105 public: | 105 public: |
106 InspectorFileReaderLoaderClient(PassRefPtr<BlobDataHandle> blob, PassOwnPtr<
TextResourceDecoder> decoder, PassRefPtrWillBeRawPtr<GetResponseBodyCallback> ca
llback) | 106 InspectorFileReaderLoaderClient(PassRefPtr<BlobDataHandle> blob, PassOwnPtr<
TextResourceDecoder> decoder, PassRefPtrWillBeRawPtr<GetResponseBodyCallback> ca
llback) |
107 : m_blob(blob) | 107 : m_blob(blob) |
108 , m_decoder(decoder) | 108 , m_decoder(decoder) |
109 , m_callback(callback) | 109 , m_callback(callback) |
110 { | 110 { |
111 m_loader = FileReaderLoader::create(FileReaderLoader::ReadByClient, this
); | 111 m_loader = FileReaderLoader::create(FileReaderLoader::ReadByClient, this
); |
112 } | 112 } |
113 | 113 |
114 virtual ~InspectorFileReaderLoaderClient() { } | 114 ~InspectorFileReaderLoaderClient() override { } |
115 | 115 |
116 void start(ExecutionContext* executionContext) | 116 void start(ExecutionContext* executionContext) |
117 { | 117 { |
118 m_rawData = adoptPtr(new ArrayBufferBuilder()); | 118 m_rawData = adoptPtr(new ArrayBufferBuilder()); |
119 if (!m_rawData || !m_rawData->isValid()) { | 119 if (!m_rawData || !m_rawData->isValid()) { |
120 m_callback->sendFailure("Couldn't allocate buffer"); | 120 m_callback->sendFailure("Couldn't allocate buffer"); |
121 dispose(); | 121 dispose(); |
122 } | 122 } |
123 m_loader->start(executionContext, m_blob); | 123 m_loader->start(executionContext, m_blob); |
124 } | 124 } |
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish
edReplayXHRFired) | 925 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish
edReplayXHRFired) |
926 { | 926 { |
927 } | 927 } |
928 | 928 |
929 bool InspectorResourceAgent::shouldForceCORSPreflight() | 929 bool InspectorResourceAgent::shouldForceCORSPreflight() |
930 { | 930 { |
931 return m_state->getBoolean(ResourceAgentState::cacheDisabled); | 931 return m_state->getBoolean(ResourceAgentState::cacheDisabled); |
932 } | 932 } |
933 | 933 |
934 } // namespace blink | 934 } // namespace blink |
OLD | NEW |