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

Side by Side Diff: ios/net/cookies/cookie_store_ios.mm

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 | « ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc ('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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ios/net/cookies/cookie_store_ios.h" 5 #include "ios/net/cookies/cookie_store_ios.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 DCHECK(system_store); 306 DCHECK(system_store);
307 307
308 NotificationTrampoline::GetInstance()->AddObserver(this); 308 NotificationTrampoline::GetInstance()->AddObserver(this);
309 309
310 cookie_monster_->SetPersistSessionCookies(true); 310 cookie_monster_->SetPersistSessionCookies(true);
311 cookie_monster_->SetForceKeepSessionState(); 311 cookie_monster_->SetForceKeepSessionState();
312 } 312 }
313 313
314 CookieStoreIOS::~CookieStoreIOS() { 314 CookieStoreIOS::~CookieStoreIOS() {
315 NotificationTrampoline::GetInstance()->RemoveObserver(this); 315 NotificationTrampoline::GetInstance()->RemoveObserver(this);
316 STLDeleteContainerPairSecondPointers(hook_map_.begin(), hook_map_.end()); 316 base::STLDeleteContainerPairSecondPointers(hook_map_.begin(),
317 hook_map_.end());
317 } 318 }
318 319
319 // static 320 // static
320 void CookieStoreIOS::SetCookiePolicy(CookiePolicy setting) { 321 void CookieStoreIOS::SetCookiePolicy(CookiePolicy setting) {
321 NSHTTPCookieAcceptPolicy policy = (setting == ALLOW) 322 NSHTTPCookieAcceptPolicy policy = (setting == ALLOW)
322 ? NSHTTPCookieAcceptPolicyAlways 323 ? NSHTTPCookieAcceptPolicyAlways
323 : NSHTTPCookieAcceptPolicyNever; 324 : NSHTTPCookieAcceptPolicyNever;
324 NSHTTPCookieStorage* store = [NSHTTPCookieStorage sharedHTTPCookieStorage]; 325 NSHTTPCookieStorage* store = [NSHTTPCookieStorage sharedHTTPCookieStorage];
325 NSHTTPCookieAcceptPolicy current_policy = [store cookieAcceptPolicy]; 326 NSHTTPCookieAcceptPolicy current_policy = [store cookieAcceptPolicy];
326 if (current_policy == policy) 327 if (current_policy == policy)
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 weak_factory_.GetWeakPtr(), callback); 1156 weak_factory_.GetWeakPtr(), callback);
1156 } 1157 }
1157 1158
1158 base::Closure CookieStoreIOS::WrapClosure(const base::Closure& callback) { 1159 base::Closure CookieStoreIOS::WrapClosure(const base::Closure& callback) {
1159 DCHECK(thread_checker_.CalledOnValidThread()); 1160 DCHECK(thread_checker_.CalledOnValidThread());
1160 return base::Bind(&CookieStoreIOS::UpdateCachesAfterClosure, 1161 return base::Bind(&CookieStoreIOS::UpdateCachesAfterClosure,
1161 weak_factory_.GetWeakPtr(), callback); 1162 weak_factory_.GetWeakPtr(), callback);
1162 } 1163 }
1163 1164
1164 } // namespace net 1165 } // namespace net
OLDNEW
« no previous file with comments | « ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698