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

Unified Diff: net/cookies/cookie_monster_store_test.h

Issue 2383393002: Remove stl_util's deletion functions from net/cookies/ and net/extras/. (Closed)
Patch Set: windows Created 4 years, 2 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
Index: net/cookies/cookie_monster_store_test.h
diff --git a/net/cookies/cookie_monster_store_test.h b/net/cookies/cookie_monster_store_test.h
index 835ec6d0520bf11b3c76e4711be709fd39f521f7..5916abe8e94ff4116830df98882cdd9ee93719b3 100644
--- a/net/cookies/cookie_monster_store_test.h
+++ b/net/cookies/cookie_monster_store_test.h
@@ -39,16 +39,16 @@ class LoadedCallbackTask
typedef CookieMonster::PersistentCookieStore::LoadedCallback LoadedCallback;
LoadedCallbackTask(LoadedCallback loaded_callback,
- std::vector<CanonicalCookie*> cookies);
+ std::vector<std::unique_ptr<CanonicalCookie>> cookies);
- void Run() { loaded_callback_.Run(cookies_); }
+ void Run() { loaded_callback_.Run(std::move(cookies_)); }
private:
friend class base::RefCountedThreadSafe<LoadedCallbackTask>;
~LoadedCallbackTask();
LoadedCallback loaded_callback_;
- std::vector<CanonicalCookie*> cookies_;
+ std::vector<std::unique_ptr<CanonicalCookie>> cookies_;
DISALLOW_COPY_AND_ASSIGN(LoadedCallbackTask);
}; // Wrapper class LoadedCallbackTask
@@ -107,7 +107,7 @@ class MockPersistentCookieStore : public CookieMonster::PersistentCookieStore {
}
void SetLoadExpectation(bool return_value,
- const std::vector<CanonicalCookie*>& result);
+ std::vector<std::unique_ptr<CanonicalCookie>> result);
const CommandList& commands() const { return commands_; }
@@ -136,7 +136,7 @@ class MockPersistentCookieStore : public CookieMonster::PersistentCookieStore {
// Deferred result to use when Load() is called.
bool load_return_value_;
- std::vector<CanonicalCookie*> load_result_;
+ std::vector<std::unique_ptr<CanonicalCookie>> load_result_;
// Indicates if the store has been fully loaded to avoid returning duplicate
// cookies.
bool loaded_;
@@ -177,7 +177,7 @@ std::unique_ptr<CanonicalCookie> BuildCanonicalCookie(
void AddCookieToList(const GURL& url,
const std::string& cookie_line,
const base::Time& creation_time,
- std::vector<CanonicalCookie*>* out_list);
+ std::vector<std::unique_ptr<CanonicalCookie>>* out_list);
// Just act like a backing database. Keep cookie information from
// Add/Update/Delete and regurgitate it when Load is called.

Powered by Google App Engine
This is Rietveld 408576698