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

Unified Diff: chrome/test/base/testing_profile.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/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index defda283ca06aeccd37718eb2f455c5c2daaf49a..f46b85c92baaa79643986dfe7148f41ce198fff9 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -83,6 +83,7 @@
#include "content/public/test/mock_resource_context.h"
#include "content/public/test/test_utils.h"
#include "extensions/common/constants.h"
+#include "net/cookies/cookie_store.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_test_util.h"
@@ -159,9 +160,12 @@ class TestExtensionURLRequestContext : public net::URLRequestContext {
TestExtensionURLRequestContext() {
content::CookieStoreConfig cookie_config;
cookie_config.cookieable_schemes.push_back(extensions::kExtensionScheme);
- set_cookie_store(content::CreateCookieStore(cookie_config));
+ cookie_store_ = content::CreateCookieStore(cookie_config);
+ set_cookie_store(cookie_store_.get());
}
+ scoped_ptr<net::CookieStore> cookie_store_;
Randy Smith (Not in Mondays) 2016/03/01 20:48:43 This (anti) pattern of a derived class actually ow
mmenke 2016/03/01 22:44:45 True...Though this isn't a "real" URLRequestContex
+
~TestExtensionURLRequestContext() override { AssertNoURLRequests(); }
};

Powered by Google App Engine
This is Rietveld 408576698