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

Side by Side Diff: net/spdy/spdy_stream.h

Issue 9617039: Change Origin bound certs -> Domain bound certs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename all the things Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 NET_SPDY_SPDY_STREAM_H_ 5 #ifndef NET_SPDY_SPDY_STREAM_H_
6 #define NET_SPDY_SPDY_STREAM_H_ 6 #define NET_SPDY_SPDY_STREAM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // Get the URL associated with this stream. Only valid when has_url() is 249 // Get the URL associated with this stream. Only valid when has_url() is
250 // true. 250 // true.
251 GURL GetUrl() const; 251 GURL GetUrl() const;
252 252
253 // ChunkCallback methods. 253 // ChunkCallback methods.
254 virtual void OnChunkAvailable() OVERRIDE; 254 virtual void OnChunkAvailable() OVERRIDE;
255 255
256 private: 256 private:
257 enum State { 257 enum State {
258 STATE_NONE, 258 STATE_NONE,
259 STATE_GET_ORIGIN_BOUND_CERT, 259 STATE_GET_DOMAIN_BOUND_CERT,
260 STATE_GET_ORIGIN_BOUND_CERT_COMPLETE, 260 STATE_GET_DOMAIN_BOUND_CERT_COMPLETE,
261 STATE_SEND_ORIGIN_BOUND_CERT, 261 STATE_SEND_DOMAIN_BOUND_CERT,
262 STATE_SEND_ORIGIN_BOUND_CERT_COMPLETE, 262 STATE_SEND_DOMAIN_BOUND_CERT_COMPLETE,
263 STATE_SEND_HEADERS, 263 STATE_SEND_HEADERS,
264 STATE_SEND_HEADERS_COMPLETE, 264 STATE_SEND_HEADERS_COMPLETE,
265 STATE_SEND_BODY, 265 STATE_SEND_BODY,
266 STATE_SEND_BODY_COMPLETE, 266 STATE_SEND_BODY_COMPLETE,
267 STATE_WAITING_FOR_RESPONSE, 267 STATE_WAITING_FOR_RESPONSE,
268 STATE_OPEN, 268 STATE_OPEN,
269 STATE_DONE 269 STATE_DONE
270 }; 270 };
271 271
272 friend class base::RefCounted<SpdyStream>; 272 friend class base::RefCounted<SpdyStream>;
273 virtual ~SpdyStream(); 273 virtual ~SpdyStream();
274 274
275 void OnGetOriginBoundCertComplete(int result); 275 void OnGetDomainBoundCertComplete(int result);
276 276
277 // Try to make progress sending/receiving the request/response. 277 // Try to make progress sending/receiving the request/response.
278 int DoLoop(int result); 278 int DoLoop(int result);
279 279
280 // The implementations of each state of the state machine. 280 // The implementations of each state of the state machine.
281 int DoGetOriginBoundCert(); 281 int DoGetDomainBoundCert();
282 int DoGetOriginBoundCertComplete(int result); 282 int DoGetDomainBoundCertComplete(int result);
283 int DoSendOriginBoundCert(); 283 int DoSendDomainBoundCert();
284 int DoSendOriginBoundCertComplete(int result); 284 int DoSendDomainBoundCertComplete(int result);
285 int DoSendHeaders(); 285 int DoSendHeaders();
286 int DoSendHeadersComplete(int result); 286 int DoSendHeadersComplete(int result);
287 int DoSendBody(); 287 int DoSendBody();
288 int DoSendBodyComplete(int result); 288 int DoSendBodyComplete(int result);
289 int DoReadHeaders(); 289 int DoReadHeaders();
290 int DoReadHeadersComplete(int result); 290 int DoReadHeadersComplete(int result);
291 int DoOpen(int result); 291 int DoOpen(int result);
292 292
293 // Update the histograms. Can safely be called repeatedly, but should only 293 // Update the histograms. Can safely be called repeatedly, but should only
294 // be called after the stream has completed. 294 // be called after the stream has completed.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 BoundNetLog net_log_; 344 BoundNetLog net_log_;
345 345
346 base::TimeTicks send_time_; 346 base::TimeTicks send_time_;
347 base::TimeTicks recv_first_byte_time_; 347 base::TimeTicks recv_first_byte_time_;
348 base::TimeTicks recv_last_byte_time_; 348 base::TimeTicks recv_last_byte_time_;
349 int send_bytes_; 349 int send_bytes_;
350 int recv_bytes_; 350 int recv_bytes_;
351 // Data received before delegate is attached. 351 // Data received before delegate is attached.
352 std::vector<scoped_refptr<IOBufferWithSize> > pending_buffers_; 352 std::vector<scoped_refptr<IOBufferWithSize> > pending_buffers_;
353 353
354 SSLClientCertType ob_cert_type_; 354 SSLClientCertType domain_bound_cert_type_;
355 std::string ob_private_key_; 355 std::string domain_bound_private_key_;
356 std::string ob_cert_; 356 std::string domain_bound_cert_;
357 OriginBoundCertService::RequestHandle ob_cert_request_handle_; 357 ServerBoundCertService::RequestHandle domain_bound_cert_request_handle_;
358 358
359 DISALLOW_COPY_AND_ASSIGN(SpdyStream); 359 DISALLOW_COPY_AND_ASSIGN(SpdyStream);
360 }; 360 };
361 361
362 class NetLogSpdyStreamErrorParameter : public NetLog::EventParameters { 362 class NetLogSpdyStreamErrorParameter : public NetLog::EventParameters {
363 public: 363 public:
364 NetLogSpdyStreamErrorParameter(spdy::SpdyStreamId stream_id, 364 NetLogSpdyStreamErrorParameter(spdy::SpdyStreamId stream_id,
365 int status, 365 int status,
366 const std::string& description); 366 const std::string& description);
367 367
368 spdy::SpdyStreamId stream_id() const { return stream_id_; } 368 spdy::SpdyStreamId stream_id() const { return stream_id_; }
369 virtual base::Value* ToValue() const OVERRIDE; 369 virtual base::Value* ToValue() const OVERRIDE;
370 370
371 private: 371 private:
372 virtual ~NetLogSpdyStreamErrorParameter(); 372 virtual ~NetLogSpdyStreamErrorParameter();
373 373
374 const spdy::SpdyStreamId stream_id_; 374 const spdy::SpdyStreamId stream_id_;
375 const int status_; 375 const int status_;
376 const std::string description_; 376 const std::string description_;
377 377
378 DISALLOW_COPY_AND_ASSIGN(NetLogSpdyStreamErrorParameter); 378 DISALLOW_COPY_AND_ASSIGN(NetLogSpdyStreamErrorParameter);
379 }; 379 };
380 380
381 } // namespace net 381 } // namespace net
382 382
383 #endif // NET_SPDY_SPDY_STREAM_H_ 383 #endif // NET_SPDY_SPDY_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698