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

Unified Diff: ios/net/cookies/cookie_store_ios.mm

Issue 2348963002: Remove stl_util's STLDeleteContainerPairSecondPointers from ios/. (Closed)
Patch Set: fix Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/net/cookies/cookie_store_ios.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/net/cookies/cookie_store_ios.mm
diff --git a/ios/net/cookies/cookie_store_ios.mm b/ios/net/cookies/cookie_store_ios.mm
index fbee5323576fc5b4c83815dfde48161c5281bf2b..aa02bf8b43c6c8839f7fa74578fb3bccfeef3441 100644
--- a/ios/net/cookies/cookie_store_ios.mm
+++ b/ios/net/cookies/cookie_store_ios.mm
@@ -16,11 +16,11 @@
#include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsobject.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/metrics/histogram.h"
#include "base/observer_list.h"
#include "base/sequenced_task_runner.h"
-#include "base/stl_util.h"
#include "base/strings/sys_string_conversions.h"
#include "base/task_runner_util.h"
#include "base/threading/thread_restrictions.h"
@@ -313,8 +313,6 @@ CookieStoreIOS::CookieStoreIOS(
CookieStoreIOS::~CookieStoreIOS() {
NotificationTrampoline::GetInstance()->RemoveObserver(this);
- base::STLDeleteContainerPairSecondPointers(hook_map_.begin(),
- hook_map_.end());
}
// static
@@ -995,7 +993,7 @@ CookieStoreIOS::AddCallbackForCookie(const GURL& gurl,
if (hook_map_.count(key) == 0) {
UpdateCacheForCookieFromSystem(gurl, name, nullptr, nullptr);
if (hook_map_.count(key) == 0)
- hook_map_[key] = new CookieChangedCallbackList;
+ hook_map_[key] = base::MakeUnique<CookieChangedCallbackList>();
}
DCHECK(hook_map_.find(key) != hook_map_.end());
@@ -1028,7 +1026,7 @@ void CookieStoreIOS::RunCallbacksForCookies(
return;
std::pair<GURL, std::string> key(url, name);
- CookieChangedCallbackList* callbacks = hook_map_[key];
+ CookieChangedCallbackList* callbacks = hook_map_[key].get();
for (const auto& cookie : cookies) {
DCHECK_EQ(name, cookie.Name());
callbacks->Notify(cookie, removed);
« no previous file with comments | « ios/net/cookies/cookie_store_ios.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698