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

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

Issue 12463021: Stop sending Accept-Charset HTTP header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r188089) Created 7 years, 9 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.h ('k') | net/url_request/url_request_context_builder.h » ('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 #include "net/url_request/url_request_context.h" 5 #include "net/url_request/url_request_context.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/debug/alias.h" 8 #include "base/debug/alias.h"
9 #include "base/debug/stack_trace.h" 9 #include "base/debug/stack_trace.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 URLRequest* URLRequestContext::CreateRequest( 79 URLRequest* URLRequestContext::CreateRequest(
80 const GURL& url, URLRequest::Delegate* delegate) const { 80 const GURL& url, URLRequest::Delegate* delegate) const {
81 return new URLRequest(url, delegate, this, network_delegate_); 81 return new URLRequest(url, delegate, this, network_delegate_);
82 } 82 }
83 83
84 void URLRequestContext::set_cookie_store(CookieStore* cookie_store) { 84 void URLRequestContext::set_cookie_store(CookieStore* cookie_store) {
85 cookie_store_ = cookie_store; 85 cookie_store_ = cookie_store;
86 } 86 }
87 87
88 std::string URLRequestContext::GetAcceptCharset() const {
89 return http_user_agent_settings_ ?
90 http_user_agent_settings_->GetAcceptCharset() : EmptyString();
91 }
92
93 std::string URLRequestContext::GetAcceptLanguage() const { 88 std::string URLRequestContext::GetAcceptLanguage() const {
94 return http_user_agent_settings_ ? 89 return http_user_agent_settings_ ?
95 http_user_agent_settings_->GetAcceptLanguage() : EmptyString(); 90 http_user_agent_settings_->GetAcceptLanguage() : EmptyString();
96 } 91 }
97 92
98 std::string URLRequestContext::GetUserAgent(const GURL& url) const { 93 std::string URLRequestContext::GetUserAgent(const GURL& url) const {
99 return http_user_agent_settings_ ? 94 return http_user_agent_settings_ ?
100 http_user_agent_settings_->GetUserAgent(url) : EmptyString(); 95 http_user_agent_settings_->GetUserAgent(url) : EmptyString();
101 } 96 }
102 97
(...skipping 14 matching lines...) Expand all
117 base::debug::Alias(&num_requests); 112 base::debug::Alias(&num_requests);
118 base::debug::Alias(&has_delegate); 113 base::debug::Alias(&has_delegate);
119 base::debug::Alias(&load_flags); 114 base::debug::Alias(&load_flags);
120 base::debug::Alias(&stack_trace); 115 base::debug::Alias(&stack_trace);
121 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: " 116 CHECK(false) << "Leaked " << num_requests << " URLRequest(s). First URL: "
122 << request->url().spec().c_str() << "."; 117 << request->url().spec().c_str() << ".";
123 } 118 }
124 } 119 }
125 120
126 } // namespace net 121 } // namespace net
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_context_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698