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