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

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

Issue 2971733002: Change CookieStore::DeleteCallback to take uint32_t. (Closed)
Patch Set: Got rid of rest of <cstdint> stuff. Created 3 years, 5 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/net/cookies/cookie_store_ios.h ('k') | net/cookies/cookie_monster.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 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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 void CookieStoreIOS::UpdateCachesAfterSet(SetCookiesCallback callback, 854 void CookieStoreIOS::UpdateCachesAfterSet(SetCookiesCallback callback,
855 bool success) { 855 bool success) {
856 DCHECK(thread_checker_.CalledOnValidThread()); 856 DCHECK(thread_checker_.CalledOnValidThread());
857 if (success) 857 if (success)
858 UpdateCachesFromCookieMonster(); 858 UpdateCachesFromCookieMonster();
859 if (!callback.is_null()) 859 if (!callback.is_null())
860 std::move(callback).Run(success); 860 std::move(callback).Run(success);
861 } 861 }
862 862
863 void CookieStoreIOS::UpdateCachesAfterDelete(DeleteCallback callback, 863 void CookieStoreIOS::UpdateCachesAfterDelete(DeleteCallback callback,
864 int num_deleted) { 864 uint32_t num_deleted) {
865 DCHECK(thread_checker_.CalledOnValidThread()); 865 DCHECK(thread_checker_.CalledOnValidThread());
866 UpdateCachesFromCookieMonster(); 866 UpdateCachesFromCookieMonster();
867 if (!callback.is_null()) 867 if (!callback.is_null())
868 std::move(callback).Run(num_deleted); 868 std::move(callback).Run(num_deleted);
869 } 869 }
870 870
871 void CookieStoreIOS::UpdateCachesAfterClosure(base::OnceClosure callback) { 871 void CookieStoreIOS::UpdateCachesAfterClosure(base::OnceClosure callback) {
872 DCHECK(thread_checker_.CalledOnValidThread()); 872 DCHECK(thread_checker_.CalledOnValidThread());
873 UpdateCachesFromCookieMonster(); 873 UpdateCachesFromCookieMonster();
874 if (!callback.is_null()) 874 if (!callback.is_null())
875 std::move(callback).Run(); 875 std::move(callback).Run();
876 } 876 }
877 877
878 net::CookieList 878 net::CookieList
879 CookieStoreIOS::CanonicalCookieListFromSystemCookies(NSArray* cookies) { 879 CookieStoreIOS::CanonicalCookieListFromSystemCookies(NSArray* cookies) {
880 net::CookieList cookie_list; 880 net::CookieList cookie_list;
881 cookie_list.reserve([cookies count]); 881 cookie_list.reserve([cookies count]);
882 for (NSHTTPCookie* cookie in cookies) { 882 for (NSHTTPCookie* cookie in cookies) {
883 base::Time created = creation_time_manager_->GetCreationTime(cookie); 883 base::Time created = creation_time_manager_->GetCreationTime(cookie);
884 cookie_list.push_back(CanonicalCookieFromSystemCookie(cookie, created)); 884 cookie_list.push_back(CanonicalCookieFromSystemCookie(cookie, created));
885 } 885 }
886 return cookie_list; 886 return cookie_list;
887 } 887 }
888 888
889 } // namespace net 889 } // namespace net
OLDNEW
« no previous file with comments | « ios/net/cookies/cookie_store_ios.h ('k') | net/cookies/cookie_monster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698