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

Side by Side Diff: net/url_request/url_request_test_util.h

Issue 981633002: Created new URLRequestContext for secure proxy check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved Secure Proxy check to separate class. Addressed comments. Created 5 years, 8 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) 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_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void Init(); 63 void Init();
64 64
65 ClientSocketFactory* client_socket_factory() { 65 ClientSocketFactory* client_socket_factory() {
66 return client_socket_factory_; 66 return client_socket_factory_;
67 } 67 }
68 void set_client_socket_factory(ClientSocketFactory* factory) { 68 void set_client_socket_factory(ClientSocketFactory* factory) {
69 client_socket_factory_ = factory; 69 client_socket_factory_ = factory;
70 } 70 }
71 71
72 void set_http_network_session_params( 72 void set_http_network_session_params(
73 const HttpNetworkSession::Params& params) { 73 const HttpNetworkSession::Params* params) {
74 http_network_session_params_.reset(
75 const_cast<HttpNetworkSession::Params*>(params));
sclittle 2015/04/02 00:07:00 You should never have to cast a const pointer to a
tbansal1 2015/04/02 23:21:20 Done. Except not moved into the .cc file to stay c
sclittle 2015/04/03 02:06:56 Could you pass in a scoped_ptr instead, so that it
tbansal1 2015/04/03 22:14:43 Not moved to C++ file. There are lot of other code
74 } 76 }
75 77
76 void SetSdchManager(scoped_ptr<SdchManager> sdch_manager) { 78 void SetSdchManager(scoped_ptr<SdchManager> sdch_manager) {
77 context_storage_.set_sdch_manager(sdch_manager.Pass()); 79 context_storage_.set_sdch_manager(sdch_manager.Pass());
78 } 80 }
79 81
80 private: 82 private:
81 bool initialized_; 83 bool initialized_;
82 84
83 // Optional parameters to override default values. Note that values that 85 // Optional parameters to override default values. Note that values that
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 NetworkDelegate* network_delegate) const override; 413 NetworkDelegate* network_delegate) const override;
412 void set_main_intercept_job(URLRequestJob* job); 414 void set_main_intercept_job(URLRequestJob* job);
413 415
414 private: 416 private:
415 mutable URLRequestJob* main_intercept_job_; 417 mutable URLRequestJob* main_intercept_job_;
416 }; 418 };
417 419
418 } // namespace net 420 } // namespace net
419 421
420 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_ 422 #endif // NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698