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

Side by Side Diff: content/shell/shell_url_request_context_getter.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 | « chrome/service/net/service_url_request_context.cc ('k') | net/http/http_util.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 "content/shell/shell_url_request_context_getter.h" 5 #include "content/shell/shell_url_request_context_getter.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (command_line.HasSwitch(switches::kDumpRenderTree)) 91 if (command_line.HasSwitch(switches::kDumpRenderTree))
92 ShellNetworkDelegate::SetAcceptAllCookies(false); 92 ShellNetworkDelegate::SetAcceptAllCookies(false);
93 url_request_context_->set_network_delegate(network_delegate_.get()); 93 url_request_context_->set_network_delegate(network_delegate_.get());
94 storage_.reset( 94 storage_.reset(
95 new net::URLRequestContextStorage(url_request_context_.get())); 95 new net::URLRequestContextStorage(url_request_context_.get()));
96 storage_->set_cookie_store(new net::CookieMonster(NULL, NULL)); 96 storage_->set_cookie_store(new net::CookieMonster(NULL, NULL));
97 storage_->set_server_bound_cert_service(new net::ServerBoundCertService( 97 storage_->set_server_bound_cert_service(new net::ServerBoundCertService(
98 new net::DefaultServerBoundCertStore(NULL), 98 new net::DefaultServerBoundCertStore(NULL),
99 base::WorkerPool::GetTaskRunner(true))); 99 base::WorkerPool::GetTaskRunner(true)));
100 storage_->set_http_user_agent_settings( 100 storage_->set_http_user_agent_settings(
101 new net::StaticHttpUserAgentSettings( 101 new net::StaticHttpUserAgentSettings("en-us,en", EmptyString()));
102 "en-us,en", "iso-8859-1,*,utf-8", EmptyString()));
103 102
104 scoped_ptr<net::HostResolver> host_resolver( 103 scoped_ptr<net::HostResolver> host_resolver(
105 net::HostResolver::CreateDefaultResolver(NULL)); 104 net::HostResolver::CreateDefaultResolver(NULL));
106 105
107 storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); 106 storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
108 if (command_line.HasSwitch(switches::kDumpRenderTree)) { 107 if (command_line.HasSwitch(switches::kDumpRenderTree)) {
109 storage_->set_proxy_service(net::ProxyService::CreateDirect()); 108 storage_->set_proxy_service(net::ProxyService::CreateDirect());
110 } else { 109 } else {
111 // TODO(jam): use v8 if possible, look at chrome code. 110 // TODO(jam): use v8 if possible, look at chrome code.
112 storage_->set_proxy_service( 111 storage_->set_proxy_service(
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 scoped_refptr<base::SingleThreadTaskRunner> 186 scoped_refptr<base::SingleThreadTaskRunner>
188 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 187 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
189 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 188 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
190 } 189 }
191 190
192 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { 191 net::HostResolver* ShellURLRequestContextGetter::host_resolver() {
193 return url_request_context_->host_resolver(); 192 return url_request_context_->host_resolver();
194 } 193 }
195 194
196 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « chrome/service/net/service_url_request_context.cc ('k') | net/http/http_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698