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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl_unittest.cc

Issue 11418203: Update net/proxy unit test initialization of URLRequestJobFactory object. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix ordering nits. Created 8 years 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 | « no previous file | 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) 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/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 params.host_resolver = host_resolver(); 83 params.host_resolver = host_resolver();
84 params.cert_verifier = cert_verifier(); 84 params.cert_verifier = cert_verifier();
85 params.proxy_service = proxy_service(); 85 params.proxy_service = proxy_service();
86 params.ssl_config_service = ssl_config_service(); 86 params.ssl_config_service = ssl_config_service();
87 params.http_server_properties = http_server_properties(); 87 params.http_server_properties = http_server_properties();
88 scoped_refptr<HttpNetworkSession> network_session( 88 scoped_refptr<HttpNetworkSession> network_session(
89 new HttpNetworkSession(params)); 89 new HttpNetworkSession(params));
90 storage_.set_http_transaction_factory(new HttpCache( 90 storage_.set_http_transaction_factory(new HttpCache(
91 network_session, 91 network_session,
92 HttpCache::DefaultBackend::InMemory(0))); 92 HttpCache::DefaultBackend::InMemory(0)));
93 url_request_job_factory_.reset(new URLRequestJobFactoryImpl); 93 scoped_ptr<URLRequestJobFactoryImpl> factory(new URLRequestJobFactoryImpl);
94 factory->AddInterceptor(new CheckNoRevocationFlagSetInterceptor);
95 url_request_job_factory_ = factory.Pass();
94 set_job_factory(url_request_job_factory_.get()); 96 set_job_factory(url_request_job_factory_.get());
95 url_request_job_factory_->AddInterceptor(
96 new CheckNoRevocationFlagSetInterceptor);
97 } 97 }
98 98
99 virtual ~RequestContext() { 99 virtual ~RequestContext() {
100 } 100 }
101 101
102 private: 102 private:
103 URLRequestContextStorage storage_; 103 URLRequestContextStorage storage_;
104 scoped_ptr<URLRequestJobFactory> url_request_job_factory_; 104 scoped_ptr<URLRequestJobFactory> url_request_job_factory_;
105 }; 105 };
106 106
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 { 498 {
499 GURL url(kEncodedUrlBroken); 499 GURL url(kEncodedUrlBroken);
500 string16 text; 500 string16 text;
501 TestCompletionCallback callback; 501 TestCompletionCallback callback;
502 int result = pac_fetcher.Fetch(url, &text, callback.callback()); 502 int result = pac_fetcher.Fetch(url, &text, callback.callback());
503 EXPECT_EQ(ERR_FAILED, result); 503 EXPECT_EQ(ERR_FAILED, result);
504 } 504 }
505 } 505 }
506 506
507 } // namespace net 507 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698