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

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

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 years, 7 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/url_request/url_request_context.cc ('k') | net/url_request/url_request_context_builder.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 // This class is useful for building a simple URLRequestContext. Most creators 5 // This class is useful for building a simple URLRequestContext. Most creators
6 // of new URLRequestContexts should use this helper class to construct it. Call 6 // of new URLRequestContexts should use this helper class to construct it. Call
7 // any configuration params, and when done, invoke Build() to construct the 7 // any configuration params, and when done, invoke Build() to construct the
8 // URLRequestContext. This URLRequestContext will own all its own storage. 8 // URLRequestContext. This URLRequestContext will own all its own storage.
9 // 9 //
10 // URLRequestContextBuilder and its associated params classes are initially 10 // URLRequestContextBuilder and its associated params classes are initially
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // By default it's disabled. 85 // By default it's disabled.
86 void set_ftp_enabled(bool enable) { 86 void set_ftp_enabled(bool enable) {
87 ftp_enabled_ = enable; 87 ftp_enabled_ = enable;
88 } 88 }
89 89
90 // By default HttpCache is enabled with a default constructed HttpCacheParams. 90 // By default HttpCache is enabled with a default constructed HttpCacheParams.
91 void EnableHttpCache(const HttpCacheParams& params); 91 void EnableHttpCache(const HttpCacheParams& params);
92 void DisableHttpCache(); 92 void DisableHttpCache();
93 93
94 scoped_refptr<URLRequestContext> Build(); 94 URLRequestContext* Build();
95 95
96 private: 96 private:
97 std::string user_agent_; 97 std::string user_agent_;
98 bool ftp_enabled_; 98 bool ftp_enabled_;
99 HostResolverParams host_resolver_params_; 99 HostResolverParams host_resolver_params_;
100 bool http_cache_enabled_; 100 bool http_cache_enabled_;
101 HttpCacheParams http_cache_params_; 101 HttpCacheParams http_cache_params_;
102 #if defined(OS_LINUX) 102 #if defined(OS_LINUX)
103 scoped_ptr<ProxyConfigService> proxy_config_service_; 103 scoped_ptr<ProxyConfigService> proxy_config_service_;
104 #endif // defined(OS_LINUX) 104 #endif // defined(OS_LINUX)
105 105
106 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); 106 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder);
107 }; 107 };
108 108
109 } // namespace net 109 } // namespace net
110 110
111 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ 111 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.cc ('k') | net/url_request/url_request_context_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698