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

Unified Diff: chrome/browser/browsing_data/browsing_data_remover_unittest.cc

Issue 1701063002: CookieStore: Remove reference counting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threadsafe
Patch Set: Small fix Created 4 years, 10 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: chrome/browser/browsing_data/browsing_data_remover_unittest.cc
diff --git a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
index 4661b5574e89f351a29af6d9900a6a5746379734..36715aa74d651c95c7e51a1f12a8a17651dc01f8 100644
--- a/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover_unittest.cc
@@ -376,8 +376,8 @@ class RemoveCookieTester {
}
protected:
- void SetMonster(net::CookieStore* monster) {
- cookie_store_ = monster;
+ void SetMonster(scoped_ptr<net::CookieStore> monster) {
+ cookie_store_ = std::move(monster);
}
private:
@@ -398,7 +398,7 @@ class RemoveCookieTester {
bool get_cookie_success_ = false;
base::Closure quit_closure_;
- net::CookieStore* cookie_store_ = nullptr;
+ scoped_ptr<net::CookieStore> cookie_store_;
DISALLOW_COPY_AND_ASSIGN(RemoveCookieTester);
};
@@ -415,11 +415,11 @@ class RemoveSafeBrowsingCookieTester : public RemoveCookieTester {
// Create a cookiemonster that does not have persistant storage, and replace
// the SafeBrowsingService created one with it.
- net::CookieStore* monster =
+ scoped_ptr<net::CookieStore> monster =
content::CreateCookieStore(content::CookieStoreConfig());
- sb_service->url_request_context()->GetURLRequestContext()->
- set_cookie_store(monster);
- SetMonster(monster);
+ sb_service->url_request_context()->GetURLRequestContext()->set_cookie_store(
+ monster.get());
+ SetMonster(std::move(monster));
Randy Smith (Not in Mondays) 2016/03/01 20:48:43 You look to be changing the deletion semantics of
mmenke 2016/03/01 22:44:45 Hrm...Actually, I'm not sure we even need to creat
}
virtual ~RemoveSafeBrowsingCookieTester() {

Powered by Google App Engine
This is Rietveld 408576698