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

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

Issue 2862041: Remove abonded privacy blacklist implementation. (Closed)
Patch Set: fix unit tests Created 10 years, 5 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 | « chrome/test/testing_profile.h ('k') | net/url_request/url_request_http_job.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 represents contextual information (cookies, cache, etc.) 5 // This class represents contextual information (cookies, cache, etc.)
6 // that's useful when processing resource requests. 6 // that's useful when processing resource requests.
7 // The class is reference-counted so that it can be cleaned up after any 7 // The class is reference-counted so that it can be cleaned up after any
8 // requests that are using it have been completed. 8 // requests that are using it have been completed.
9 9
10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return EmptyString(); 105 return EmptyString();
106 } 106 }
107 107
108 // In general, referrer_charset is not known when URLRequestContext is 108 // In general, referrer_charset is not known when URLRequestContext is
109 // constructed. So, we need a setter. 109 // constructed. So, we need a setter.
110 const std::string& referrer_charset() const { return referrer_charset_; } 110 const std::string& referrer_charset() const { return referrer_charset_; }
111 void set_referrer_charset(const std::string& charset) { 111 void set_referrer_charset(const std::string& charset) {
112 referrer_charset_ = charset; 112 referrer_charset_ = charset;
113 } 113 }
114 114
115 // Called before adding cookies to requests. Returns true if cookie can
116 // be added to the request. The cookie might still be modified though.
117 virtual bool InterceptRequestCookies(const URLRequest* request,
118 const std::string& cookies) const {
119 return true;
120 }
121
122 // Called before adding cookies from respones to the cookie monster. Returns
123 // true if the cookie can be added. The cookie might still be modified though.
124 virtual bool InterceptResponseCookie(const URLRequest* request,
125 const std::string& cookie) const {
126 return true;
127 }
128
129 protected: 115 protected:
130 friend class base::RefCountedThreadSafe<URLRequestContext>; 116 friend class base::RefCountedThreadSafe<URLRequestContext>;
131 117
132 virtual ~URLRequestContext() {} 118 virtual ~URLRequestContext() {}
133 119
134 // The following members are expected to be initialized and owned by 120 // The following members are expected to be initialized and owned by
135 // subclasses. 121 // subclasses.
136 net::NetLog* net_log_; 122 net::NetLog* net_log_;
137 scoped_refptr<net::HostResolver> host_resolver_; 123 scoped_refptr<net::HostResolver> host_resolver_;
138 scoped_refptr<net::ProxyService> proxy_service_; 124 scoped_refptr<net::ProxyService> proxy_service_;
(...skipping 11 matching lines...) Expand all
150 // The charset of the referrer where this request comes from. It's not 136 // The charset of the referrer where this request comes from. It's not
151 // used in communication with a server but is used to construct a suggested 137 // used in communication with a server but is used to construct a suggested
152 // filename for file download. 138 // filename for file download.
153 std::string referrer_charset_; 139 std::string referrer_charset_;
154 140
155 private: 141 private:
156 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); 142 DISALLOW_COPY_AND_ASSIGN(URLRequestContext);
157 }; 143 };
158 144
159 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ 145 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « chrome/test/testing_profile.h ('k') | net/url_request/url_request_http_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698