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

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

Issue 12989038: [SPDY] Remove some setters in SpdyStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed DISALLOW_COPY_AND_ASSIGN again Created 7 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
« no previous file with comments | « net/spdy/spdy_stream.h ('k') | net/spdy/spdy_stream_spdy2_unittest.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) 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 #include "net/spdy/spdy_stream.h" 5 #include "net/spdy/spdy_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h"
8 #include "base/logging.h" 9 #include "base/logging.h"
9 #include "base/message_loop.h" 10 #include "base/message_loop.h"
10 #include "base/stringprintf.h" 11 #include "base/stringprintf.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 #include "net/spdy/spdy_http_utils.h" 13 #include "net/spdy/spdy_http_utils.h"
13 #include "net/spdy/spdy_session.h" 14 #include "net/spdy/spdy_session.h"
14 15
15 namespace net { 16 namespace net {
16 17
17 namespace { 18 namespace {
(...skipping 25 matching lines...) Expand all
43 if (*i >= 'A' && *i <= 'Z') { 44 if (*i >= 'A' && *i <= 'Z') {
44 return true; 45 return true;
45 } 46 }
46 } 47 }
47 return false; 48 return false;
48 } 49 }
49 50
50 } // namespace 51 } // namespace
51 52
52 SpdyStream::SpdyStream(SpdySession* session, 53 SpdyStream::SpdyStream(SpdySession* session,
54 const std::string& path,
55 RequestPriority priority,
56 int32 initial_send_window_size,
57 int32 initial_recv_window_size,
53 bool pushed, 58 bool pushed,
54 const BoundNetLog& net_log) 59 const BoundNetLog& net_log)
55 : continue_buffering_data_(true), 60 : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
61 continue_buffering_data_(true),
56 stream_id_(0), 62 stream_id_(0),
57 priority_(HIGHEST), 63 path_(path),
64 priority_(priority),
58 slot_(0), 65 slot_(0),
59 send_stalled_by_flow_control_(false), 66 send_stalled_by_flow_control_(false),
60 send_window_size_(kSpdyStreamInitialWindowSize), 67 send_window_size_(initial_send_window_size),
61 recv_window_size_(kSpdyStreamInitialWindowSize), 68 recv_window_size_(initial_recv_window_size),
62 unacked_recv_window_bytes_(0), 69 unacked_recv_window_bytes_(0),
63 pushed_(pushed), 70 pushed_(pushed),
64 response_received_(false), 71 response_received_(false),
65 session_(session), 72 session_(session),
66 delegate_(NULL), 73 delegate_(NULL),
67 request_time_(base::Time::Now()), 74 request_time_(base::Time::Now()),
68 response_(new SpdyHeaderBlock), 75 response_(new SpdyHeaderBlock),
69 io_state_(STATE_NONE), 76 io_state_(STATE_NONE),
70 response_status_(OK), 77 response_status_(OK),
71 cancelled_(false), 78 cancelled_(false),
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 739
733 io_state_ = STATE_GET_DOMAIN_BOUND_CERT_COMPLETE; 740 io_state_ = STATE_GET_DOMAIN_BOUND_CERT_COMPLETE;
734 ServerBoundCertService* sbc_service = session_->GetServerBoundCertService(); 741 ServerBoundCertService* sbc_service = session_->GetServerBoundCertService();
735 DCHECK(sbc_service != NULL); 742 DCHECK(sbc_service != NULL);
736 std::vector<uint8> requested_cert_types; 743 std::vector<uint8> requested_cert_types;
737 requested_cert_types.push_back(CLIENT_CERT_ECDSA_SIGN); 744 requested_cert_types.push_back(CLIENT_CERT_ECDSA_SIGN);
738 int rv = sbc_service->GetDomainBoundCert( 745 int rv = sbc_service->GetDomainBoundCert(
739 GetUrl().GetOrigin().spec(), requested_cert_types, 746 GetUrl().GetOrigin().spec(), requested_cert_types,
740 &domain_bound_cert_type_, &domain_bound_private_key_, &domain_bound_cert_, 747 &domain_bound_cert_type_, &domain_bound_private_key_, &domain_bound_cert_,
741 base::Bind(&SpdyStream::OnGetDomainBoundCertComplete, 748 base::Bind(&SpdyStream::OnGetDomainBoundCertComplete,
742 base::Unretained(this)), 749 weak_ptr_factory_.GetWeakPtr()),
743 &domain_bound_cert_request_handle_); 750 &domain_bound_cert_request_handle_);
744 return rv; 751 return rv;
745 } 752 }
746 753
747 int SpdyStream::DoGetDomainBoundCertComplete(int result) { 754 int SpdyStream::DoGetDomainBoundCertComplete(int result) {
748 if (result != OK) 755 if (result != OK)
749 return result; 756 return result;
750 757
751 io_state_ = STATE_SEND_DOMAIN_BOUND_CERT; 758 io_state_ = STATE_SEND_DOMAIN_BOUND_CERT;
752 slot_ = session_->credential_state()->SetHasCredential(GetUrl()); 759 slot_ = session_->credential_state()->SetHasCredential(GetUrl());
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 } 883 }
877 884
878 recv_window_size_ -= delta_window_size; 885 recv_window_size_ -= delta_window_size;
879 net_log_.AddEvent( 886 net_log_.AddEvent(
880 NetLog::TYPE_SPDY_STREAM_UPDATE_RECV_WINDOW, 887 NetLog::TYPE_SPDY_STREAM_UPDATE_RECV_WINDOW,
881 base::Bind(&NetLogSpdyStreamWindowUpdateCallback, 888 base::Bind(&NetLogSpdyStreamWindowUpdateCallback,
882 stream_id_, -delta_window_size, recv_window_size_)); 889 stream_id_, -delta_window_size, recv_window_size_));
883 } 890 }
884 891
885 } // namespace net 892 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream.h ('k') | net/spdy/spdy_stream_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698