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

Side by Side Diff: mojo/services/network/network_context.cc

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Sync'd to revision p349162. Created 5 years, 3 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 | « ios/web/shell/shell_url_request_context_getter.cc ('k') | net/cert/cert_verifier.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/network/network_context.h" 5 #include "mojo/services/network/network_context.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 net::HostResolver::CreateDefaultResolver(nullptr)); 166 net::HostResolver::CreateDefaultResolver(nullptr));
167 scoped_ptr<net::MappedHostResolver> remapped_host_resolver( 167 scoped_ptr<net::MappedHostResolver> remapped_host_resolver(
168 new net::MappedHostResolver(host_resolver.Pass())); 168 new net::MappedHostResolver(host_resolver.Pass()));
169 remapped_host_resolver->SetRulesFromString( 169 remapped_host_resolver->SetRulesFromString(
170 command_line->GetSwitchValueASCII(kHostResolverRules)); 170 command_line->GetSwitchValueASCII(kHostResolverRules));
171 builder.set_host_resolver(remapped_host_resolver.Pass()); 171 builder.set_host_resolver(remapped_host_resolver.Pass());
172 } 172 }
173 173
174 builder.set_accept_language("en-us,en"); 174 builder.set_accept_language("en-us,en");
175 builder.set_user_agent(mojo::common::GetUserAgent()); 175 builder.set_user_agent(mojo::common::GetUserAgent());
176 builder.set_proxy_service(make_scoped_ptr(net::ProxyService::CreateDirect())); 176 builder.set_proxy_service(net::ProxyService::CreateDirect());
177 builder.set_transport_security_persister_path(base_path); 177 builder.set_transport_security_persister_path(base_path);
178 178
179 net::URLRequestContextBuilder::HttpCacheParams cache_params; 179 net::URLRequestContextBuilder::HttpCacheParams cache_params;
180 #if defined(OS_ANDROID) 180 #if defined(OS_ANDROID)
181 // On Android, we store the cache on disk becase we can run only a single 181 // On Android, we store the cache on disk becase we can run only a single
182 // instance of the shell at a time. 182 // instance of the shell at a time.
183 cache_params.type = net::URLRequestContextBuilder::HttpCacheParams::DISK; 183 cache_params.type = net::URLRequestContextBuilder::HttpCacheParams::DISK;
184 cache_params.path = base_path.Append(FILE_PATH_LITERAL("Cache")); 184 cache_params.path = base_path.Append(FILE_PATH_LITERAL("Cache"));
185 #else 185 #else
186 // On desktop, we store the cache in memory so we can run many shells 186 // On desktop, we store the cache in memory so we can run many shells
(...skipping 19 matching lines...) Expand all
206 false, // TODO(erg): Make RESTORED_SESSION_COOKIES configurable. 206 false, // TODO(erg): Make RESTORED_SESSION_COOKIES configurable.
207 nullptr); 207 nullptr);
208 builder.SetCookieAndChannelIdStores( 208 builder.SetCookieAndChannelIdStores(
209 new net::CookieMonster(cookie_store, nullptr), nullptr); 209 new net::CookieMonster(cookie_store, nullptr), nullptr);
210 } 210 }
211 211
212 return builder.Build().Pass(); 212 return builder.Build().Pass();
213 } 213 }
214 214
215 } // namespace mojo 215 } // namespace mojo
OLDNEW
« no previous file with comments | « ios/web/shell/shell_url_request_context_getter.cc ('k') | net/cert/cert_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698