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

Side by Side Diff: content/shell/browser/shell_url_request_context_getter.cc

Issue 110883017: Add CookieStoreConfig to unify API for in-memory and persistent CookieStore Creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge ToT again. Created 6 years, 11 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 | « content/public/browser/cookie_store_factory.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/browser/shell_url_request_context_getter.h" 5 #include "content/shell/browser/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/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 95 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
96 96
97 url_request_context_.reset(new net::URLRequestContext()); 97 url_request_context_.reset(new net::URLRequestContext());
98 url_request_context_->set_net_log(net_log_); 98 url_request_context_->set_net_log(net_log_);
99 network_delegate_.reset(new ShellNetworkDelegate); 99 network_delegate_.reset(new ShellNetworkDelegate);
100 if (command_line.HasSwitch(switches::kDumpRenderTree)) 100 if (command_line.HasSwitch(switches::kDumpRenderTree))
101 ShellNetworkDelegate::SetAcceptAllCookies(false); 101 ShellNetworkDelegate::SetAcceptAllCookies(false);
102 url_request_context_->set_network_delegate(network_delegate_.get()); 102 url_request_context_->set_network_delegate(network_delegate_.get());
103 storage_.reset( 103 storage_.reset(
104 new net::URLRequestContextStorage(url_request_context_.get())); 104 new net::URLRequestContextStorage(url_request_context_.get()));
105 storage_->set_cookie_store(CreateInMemoryCookieStore(NULL)); 105 storage_->set_cookie_store(
106 content::CreateCookieStore(content::CookieStoreConfig()));
106 storage_->set_server_bound_cert_service(new net::ServerBoundCertService( 107 storage_->set_server_bound_cert_service(new net::ServerBoundCertService(
107 new net::DefaultServerBoundCertStore(NULL), 108 new net::DefaultServerBoundCertStore(NULL),
108 base::WorkerPool::GetTaskRunner(true))); 109 base::WorkerPool::GetTaskRunner(true)));
109 storage_->set_http_user_agent_settings( 110 storage_->set_http_user_agent_settings(
110 new net::StaticHttpUserAgentSettings("en-us,en", std::string())); 111 new net::StaticHttpUserAgentSettings("en-us,en", std::string()));
111 112
112 scoped_ptr<net::HostResolver> host_resolver( 113 scoped_ptr<net::HostResolver> host_resolver(
113 net::HostResolver::CreateDefaultResolver( 114 net::HostResolver::CreateDefaultResolver(
114 url_request_context_->net_log())); 115 url_request_context_->net_log()));
115 116
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 scoped_refptr<base::SingleThreadTaskRunner> 224 scoped_refptr<base::SingleThreadTaskRunner>
224 ShellURLRequestContextGetter::GetNetworkTaskRunner() const { 225 ShellURLRequestContextGetter::GetNetworkTaskRunner() const {
225 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 226 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
226 } 227 }
227 228
228 net::HostResolver* ShellURLRequestContextGetter::host_resolver() { 229 net::HostResolver* ShellURLRequestContextGetter::host_resolver() {
229 return url_request_context_->host_resolver(); 230 return url_request_context_->host_resolver();
230 } 231 }
231 232
232 } // namespace content 233 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/cookie_store_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698