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

Side by Side Diff: net/http/http_stream_factory_impl_job_controller_unittest.cc

Issue 2925093002: Make SpdySessionKey a const member of HttpStreamFactoryImpl::Job (Closed)
Patch Set: address comment Created 3 years, 6 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
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | no next file » | 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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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/http/http_stream_factory_impl_job_controller.h" 5 #include "net/http/http_stream_factory_impl_job_controller.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 // Returns |num_streams_| of |job|. It should be 0 for non-preconnect Jobs. 143 // Returns |num_streams_| of |job|. It should be 0 for non-preconnect Jobs.
144 static int GetNumStreams(const HttpStreamFactoryImpl::Job* job) { 144 static int GetNumStreams(const HttpStreamFactoryImpl::Job* job) {
145 return job->num_streams_; 145 return job->num_streams_;
146 } 146 }
147 147
148 // Return SpdySessionKey of |job|. 148 // Return SpdySessionKey of |job|.
149 static const SpdySessionKey GetSpdySessionKey( 149 static const SpdySessionKey GetSpdySessionKey(
150 const HttpStreamFactoryImpl::Job* job) { 150 const HttpStreamFactoryImpl::Job* job) {
151 return job->GetSpdySessionKey(); 151 return job->spdy_session_key_;
152 } 152 }
153 }; 153 };
154 154
155 class JobControllerPeer { 155 class JobControllerPeer {
156 public: 156 public:
157 static bool main_job_is_blocked( 157 static bool main_job_is_blocked(
158 HttpStreamFactoryImpl::JobController* job_controller) { 158 HttpStreamFactoryImpl::JobController* job_controller) {
159 return job_controller->main_job_is_blocked_; 159 return job_controller->main_job_is_blocked_;
160 } 160 }
161 static bool main_job_is_resumed( 161 static bool main_job_is_resumed(
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 Preconnect(kNumPreconects); 1722 Preconnect(kNumPreconects);
1723 // If experiment is enabled, only 1 stream is requested. 1723 // If experiment is enabled, only 1 stream is requested.
1724 EXPECT_EQ( 1724 EXPECT_EQ(
1725 (int)actual_num_connects, 1725 (int)actual_num_connects,
1726 HttpStreamFactoryImplJobPeer::GetNumStreams(job_controller_->main_job())); 1726 HttpStreamFactoryImplJobPeer::GetNumStreams(job_controller_->main_job()));
1727 base::RunLoop().RunUntilIdle(); 1727 base::RunLoop().RunUntilIdle();
1728 EXPECT_TRUE(HttpStreamFactoryImplPeer::IsJobControllerDeleted(factory_)); 1728 EXPECT_TRUE(HttpStreamFactoryImplPeer::IsJobControllerDeleted(factory_));
1729 } 1729 }
1730 1730
1731 } // namespace net 1731 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698