summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request_context.h14
-rw-r--r--net/url_request/url_request_http_job.cc9
2 files changed, 3 insertions, 20 deletions
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h
index 36b42b3..51a6066 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -112,20 +112,6 @@ class URLRequestContext
referrer_charset_ = charset;
}
- // Called before adding cookies to requests. Returns true if cookie can
- // be added to the request. The cookie might still be modified though.
- virtual bool InterceptRequestCookies(const URLRequest* request,
- const std::string& cookies) const {
- return true;
- }
-
- // Called before adding cookies from respones to the cookie monster. Returns
- // true if the cookie can be added. The cookie might still be modified though.
- virtual bool InterceptResponseCookie(const URLRequest* request,
- const std::string& cookie) const {
- return true;
- }
-
protected:
friend class base::RefCountedThreadSafe<URLRequestContext>;
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 7041b8d..4f44f2e3 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -448,8 +448,7 @@ void URLRequestHttpJob::OnCanGetCookiesCompleted(int policy) {
std::string cookies =
request_->context()->cookie_store()->GetCookiesWithOptions(
request_->url(), options);
- if (request_->context()->InterceptRequestCookies(request_, cookies) &&
- !cookies.empty()) {
+ if (!cookies.empty()) {
request_info_.extra_headers.SetHeader(
net::HttpRequestHeaders::kCookie, cookies);
}
@@ -785,10 +784,8 @@ void URLRequestHttpJob::FetchResponseCookies(
std::string value;
void* iter = NULL;
- while (response_info->headers->EnumerateHeader(&iter, name, &value)) {
- if (request_->context()->InterceptResponseCookie(request_, value))
- cookies->push_back(value);
- }
+ while (response_info->headers->EnumerateHeader(&iter, name, &value))
+ cookies->push_back(value);
}
class HTTPSProberDelegate : public net::HTTPSProberDelegate {