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

Side by Side Diff: ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc

Issue 2230123003: ios: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 | « no previous file | ios/net/cookies/cookie_store_ios.mm » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/browser_state/chrome_browser_state_io_data.h" 5 #include "ios/chrome/browser/browser_state/chrome_browser_state_io_data.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 const { 261 const {
262 DCHECK(initialized_); 262 DCHECK(initialized_);
263 return main_request_context_.get(); 263 return main_request_context_.get();
264 } 264 }
265 265
266 net::URLRequestContext* ChromeBrowserStateIOData::GetIsolatedAppRequestContext( 266 net::URLRequestContext* ChromeBrowserStateIOData::GetIsolatedAppRequestContext(
267 net::URLRequestContext* main_context, 267 net::URLRequestContext* main_context,
268 const base::FilePath& partition_path) const { 268 const base::FilePath& partition_path) const {
269 DCHECK(initialized_); 269 DCHECK(initialized_);
270 AppRequestContext* context = nullptr; 270 AppRequestContext* context = nullptr;
271 if (ContainsKey(app_request_context_map_, partition_path)) { 271 if (base::ContainsKey(app_request_context_map_, partition_path)) {
272 context = app_request_context_map_[partition_path]; 272 context = app_request_context_map_[partition_path];
273 } else { 273 } else {
274 context = AcquireIsolatedAppRequestContext(main_context); 274 context = AcquireIsolatedAppRequestContext(main_context);
275 app_request_context_map_[partition_path] = context; 275 app_request_context_map_[partition_path] = context;
276 } 276 }
277 DCHECK(context); 277 DCHECK(context);
278 return context; 278 return context;
279 } 279 }
280 280
281 void ChromeBrowserStateIOData::SetCookieStoreForPartitionPath( 281 void ChromeBrowserStateIOData::SetCookieStoreForPartitionPath(
282 std::unique_ptr<net::CookieStore> cookie_store, 282 std::unique_ptr<net::CookieStore> cookie_store,
283 const base::FilePath& partition_path) { 283 const base::FilePath& partition_path) {
284 DCHECK(ContainsKey(app_request_context_map_, partition_path)); 284 DCHECK(base::ContainsKey(app_request_context_map_, partition_path));
285 app_request_context_map_[partition_path]->SetCookieStore( 285 app_request_context_map_[partition_path]->SetCookieStore(
286 std::move(cookie_store)); 286 std::move(cookie_store));
287 } 287 }
288 288
289 content_settings::CookieSettings* ChromeBrowserStateIOData::GetCookieSettings() 289 content_settings::CookieSettings* ChromeBrowserStateIOData::GetCookieSettings()
290 const { 290 const {
291 DCHECK(initialized_); 291 DCHECK(initialized_);
292 return cookie_settings_.get(); 292 return cookie_settings_.get();
293 } 293 }
294 294
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 return std::unique_ptr<net::HttpCache>( 484 return std::unique_ptr<net::HttpCache>(
485 new net::HttpCache(session, std::move(main_backend), true)); 485 new net::HttpCache(session, std::move(main_backend), true));
486 } 486 }
487 487
488 std::unique_ptr<net::HttpCache> ChromeBrowserStateIOData::CreateHttpFactory( 488 std::unique_ptr<net::HttpCache> ChromeBrowserStateIOData::CreateHttpFactory(
489 net::HttpNetworkSession* shared_session, 489 net::HttpNetworkSession* shared_session,
490 std::unique_ptr<net::HttpCache::BackendFactory> backend) const { 490 std::unique_ptr<net::HttpCache::BackendFactory> backend) const {
491 return std::unique_ptr<net::HttpCache>( 491 return std::unique_ptr<net::HttpCache>(
492 new net::HttpCache(shared_session, std::move(backend), true)); 492 new net::HttpCache(shared_session, std::move(backend), true));
493 } 493 }
OLDNEW
« no previous file with comments | « no previous file | ios/net/cookies/cookie_store_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698