Commit de306347 authored by avi's avatar avi Committed by Commit bot

Remove stl_util's STLDeleteContainerPairSecondPointers from ios/.

BUG=555865

Review-Url: https://codereview.chromium.org/2348963002
Cr-Commit-Position: refs/heads/master@{#419447}
parent ff7e85cb
...@@ -324,9 +324,9 @@ class CookieStoreIOS : public net::CookieStore, ...@@ -324,9 +324,9 @@ class CookieStoreIOS : public net::CookieStore,
std::unique_ptr<CookieCache> cookie_cache_; std::unique_ptr<CookieCache> cookie_cache_;
// Callbacks for cookie changes installed by AddCallbackForCookie. // Callbacks for cookie changes installed by AddCallbackForCookie.
typedef std::map<std::pair<GURL, std::string>, CookieChangedCallbackList*> std::map<std::pair<GURL, std::string>,
CookieChangedHookMap; std::unique_ptr<CookieChangedCallbackList>>
CookieChangedHookMap hook_map_; hook_map_;
base::WeakPtrFactory<CookieStoreIOS> weak_factory_; base::WeakPtrFactory<CookieStoreIOS> weak_factory_;
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
#include "base/mac/foundation_util.h" #include "base/mac/foundation_util.h"
#include "base/mac/scoped_nsobject.h" #include "base/mac/scoped_nsobject.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "base/sequenced_task_runner.h" #include "base/sequenced_task_runner.h"
#include "base/stl_util.h"
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "base/task_runner_util.h" #include "base/task_runner_util.h"
#include "base/threading/thread_restrictions.h" #include "base/threading/thread_restrictions.h"
...@@ -313,8 +313,6 @@ CookieStoreIOS::CookieStoreIOS( ...@@ -313,8 +313,6 @@ CookieStoreIOS::CookieStoreIOS(
CookieStoreIOS::~CookieStoreIOS() { CookieStoreIOS::~CookieStoreIOS() {
NotificationTrampoline::GetInstance()->RemoveObserver(this); NotificationTrampoline::GetInstance()->RemoveObserver(this);
base::STLDeleteContainerPairSecondPointers(hook_map_.begin(),
hook_map_.end());
} }
// static // static
...@@ -995,7 +993,7 @@ CookieStoreIOS::AddCallbackForCookie(const GURL& gurl, ...@@ -995,7 +993,7 @@ CookieStoreIOS::AddCallbackForCookie(const GURL& gurl,
if (hook_map_.count(key) == 0) { if (hook_map_.count(key) == 0) {
UpdateCacheForCookieFromSystem(gurl, name, nullptr, nullptr); UpdateCacheForCookieFromSystem(gurl, name, nullptr, nullptr);
if (hook_map_.count(key) == 0) 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()); DCHECK(hook_map_.find(key) != hook_map_.end());
...@@ -1028,7 +1026,7 @@ void CookieStoreIOS::RunCallbacksForCookies( ...@@ -1028,7 +1026,7 @@ void CookieStoreIOS::RunCallbacksForCookies(
return; return;
std::pair<GURL, std::string> key(url, name); std::pair<GURL, std::string> key(url, name);
CookieChangedCallbackList* callbacks = hook_map_[key]; CookieChangedCallbackList* callbacks = hook_map_[key].get();
for (const auto& cookie : cookies) { for (const auto& cookie : cookies) {
DCHECK_EQ(name, cookie.Name()); DCHECK_EQ(name, cookie.Name());
callbacks->Notify(cookie, removed); callbacks->Notify(cookie, removed);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment