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

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: 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
« no previous file with comments | « Source/core/html/imports/HTMLImportLoader.cpp ('k') | Source/core/loader/DocumentLoader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportLoader.cpp ('k') | Source/core/loader/DocumentLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698