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

Side by Side Diff: chrome_frame/protocol_sink_wrap.h

Issue 2987001: Implement HTTP headers sniffing in the ProtocolSinkWrap, instead of relying o... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « chrome_frame/http_negotiate.cc ('k') | chrome_frame/protocol_sink_wrap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ 5 #ifndef CHROME_FRAME_PROTOCOL_SINK_WRAP_H_
6 #define CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ 6 #define CHROME_FRAME_PROTOCOL_SINK_WRAP_H_
7 7
8 #include <exdisp.h> 8 #include <exdisp.h>
9 #include <urlmon.h> 9 #include <urlmon.h>
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // What BINDSTATUS_MIMETYPEAVAILABLE and Co. tells us. 127 // What BINDSTATUS_MIMETYPEAVAILABLE and Co. tells us.
128 ScopedBstr suggested_mime_type_; 128 ScopedBstr suggested_mime_type_;
129 // At least one of the following has been received: 129 // At least one of the following has been received:
130 // BINDSTATUS_MIMETYPEAVAILABLE, 130 // BINDSTATUS_MIMETYPEAVAILABLE,
131 // MIMESTATUS_VERIFIEDMIMETYPEAVAILABLE 131 // MIMESTATUS_VERIFIEDMIMETYPEAVAILABLE
132 // BINDSTATUS_SERVER_MIMETYPEAVAILABLE 132 // BINDSTATUS_SERVER_MIMETYPEAVAILABLE
133 bool has_suggested_mime_type_; 133 bool has_suggested_mime_type_;
134 // BINDSTATUS_SERVER_MIMETYPEAVAILABLE received, so we shall fire one. 134 // BINDSTATUS_SERVER_MIMETYPEAVAILABLE received, so we shall fire one.
135 bool has_server_mime_type_; 135 bool has_server_mime_type_;
136 136
137 // Did we received ReportData()
138 bool report_data_received_;
139 RendererType renderer_type_; 137 RendererType renderer_type_;
140 138
141 // Buffer for accumulated data including 1 extra for NULL-terminator 139 // Buffer for accumulated data including 1 extra for NULL-terminator
142 static const size_t kMaxContentSniffLength = 2 * 1024; 140 static const size_t kMaxContentSniffLength = 2 * 1024;
143 char buffer_[kMaxContentSniffLength + 1]; 141 char buffer_[kMaxContentSniffLength + 1];
144 unsigned long buffer_size_; // NOLINT 142 unsigned long buffer_size_; // NOLINT
145 unsigned long buffer_pos_; // NOLINT 143 unsigned long buffer_pos_; // NOLINT
146 144
147 HRESULT FillBuffer(); 145 HRESULT FillBuffer();
148 void SaveSuggestedMimeType(LPCWSTR status_text); 146 void SaveSuggestedMimeType(LPCWSTR status_text);
149 void FireSugestedMimeType(IInternetProtocolSink* delegate); 147 void FireSugestedMimeType(IInternetProtocolSink* delegate);
150 }; 148 };
151 149
152 struct TransactionHooks { 150 struct TransactionHooks {
153 void InstallHooks(); 151 void InstallHooks();
154 void RevertHooks(); 152 void RevertHooks();
155 }; 153 };
156 154
157 DECLSPEC_SELECTANY struct TransactionHooks g_trans_hooks; 155 DECLSPEC_SELECTANY struct TransactionHooks g_trans_hooks;
158 156
159 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_ 157 #endif // CHROME_FRAME_PROTOCOL_SINK_WRAP_H_
160 158
OLDNEW
« no previous file with comments | « chrome_frame/http_negotiate.cc ('k') | chrome_frame/protocol_sink_wrap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698