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

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

Issue 1162893003: Remove HttpStreamFactoryImpl::Job::MarkAsAlternate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_request.h" 5 #include "net/http/http_stream_factory_impl_request.h"
6 6
7 #include "net/http/http_stream_factory_impl_job.h" 7 #include "net/http/http_stream_factory_impl_job.h"
8 #include "net/proxy/proxy_info.h" 8 #include "net/proxy/proxy_info.h"
9 #include "net/proxy/proxy_service.h" 9 #include "net/proxy/proxy_service.h"
10 #include "net/spdy/spdy_test_util_common.h" 10 #include "net/spdy/spdy_test_util_common.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 scoped_refptr<HttpNetworkSession> 67 scoped_refptr<HttpNetworkSession>
68 session(SpdySessionDependencies::SpdyCreateSession(&session_deps)); 68 session(SpdySessionDependencies::SpdyCreateSession(&session_deps));
69 HttpStreamFactoryImpl* factory = 69 HttpStreamFactoryImpl* factory =
70 static_cast<HttpStreamFactoryImpl*>(session->http_stream_factory()); 70 static_cast<HttpStreamFactoryImpl*>(session->http_stream_factory());
71 71
72 DoNothingRequestDelegate request_delegate; 72 DoNothingRequestDelegate request_delegate;
73 HttpStreamFactoryImpl::Request request( 73 HttpStreamFactoryImpl::Request request(
74 GURL(), factory, &request_delegate, NULL, BoundNetLog()); 74 GURL(), factory, &request_delegate, NULL, BoundNetLog());
75 75
76 HttpStreamFactoryImpl::Job* job = 76 // Default constructed AlternativeService for non alternative Job.
77 new HttpStreamFactoryImpl::Job(factory, 77 HttpStreamFactoryImpl::Job* job = new HttpStreamFactoryImpl::Job(
78 session.get(), 78 factory, session.get(), HttpRequestInfo(), DEFAULT_PRIORITY, SSLConfig(),
79 HttpRequestInfo(), 79 SSLConfig(), AlternativeService(), NULL);
80 DEFAULT_PRIORITY,
81 SSLConfig(),
82 SSLConfig(),
83 NULL);
84 request.AttachJob(job); 80 request.AttachJob(job);
85 EXPECT_EQ(DEFAULT_PRIORITY, job->priority()); 81 EXPECT_EQ(DEFAULT_PRIORITY, job->priority());
86 82
87 request.SetPriority(MEDIUM); 83 request.SetPriority(MEDIUM);
88 EXPECT_EQ(MEDIUM, job->priority()); 84 EXPECT_EQ(MEDIUM, job->priority());
89 85
90 // Make |job| the bound job. 86 // Make |job| the bound job.
91 request.OnStreamFailed(job, ERR_FAILED, SSLConfig(), SSL_FAILURE_NONE); 87 request.OnStreamFailed(job, ERR_FAILED, SSLConfig(), SSL_FAILURE_NONE);
92 88
93 request.SetPriority(IDLE); 89 request.SetPriority(IDLE);
94 EXPECT_EQ(IDLE, job->priority()); 90 EXPECT_EQ(IDLE, job->priority());
95 } 91 }
96 92
97 } // namespace net 93 } // namespace net
OLDNEW
« net/http/http_stream_factory_impl_job.h ('K') | « 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