Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Side by Side Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 603903003: [Streams] Pass WebDataConsumerHandle when the response arrives. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@web-data-pipe
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish edReplayXHRFired) 888 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish edReplayXHRFired)
888 { 889 {
889 } 890 }
890 891
891 bool InspectorResourceAgent::shouldForceCORSPreflight() 892 bool InspectorResourceAgent::shouldForceCORSPreflight()
892 { 893 {
893 return m_state->getBoolean(ResourceAgentState::cacheDisabled); 894 return m_state->getBoolean(ResourceAgentState::cacheDisabled);
894 } 895 }
895 896
896 } // namespace blink 897 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698