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

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

Issue 1602283002: Convert some raw CanonicalCookie ptrs to scoped_ptr<CanonicalCookie>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix missed CanonicalCookie::Create() callsite in ios/net/cookies/cookie_store_ios_unittest.mm Created 4 years, 11 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 | « no previous file | net/cookies/canonical_cookie.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/net/cookies/cookie_store_ios_unittest.mm
diff --git a/ios/net/cookies/cookie_store_ios_unittest.mm b/ios/net/cookies/cookie_store_ios_unittest.mm
index 9bb977f6730b386886f3f3cc96e943973e47cbfd..7271abd6d7f08f860d62fcba2c3476adccd67db6 100644
--- a/ios/net/cookies/cookie_store_ios_unittest.mm
+++ b/ios/net/cookies/cookie_store_ios_unittest.mm
@@ -208,8 +208,11 @@ class TestPersistentCookieStore
std::vector<net::CanonicalCookie*> cookies;
net::CookieOptions options;
options.set_include_httponly();
- cookies.push_back(net::CanonicalCookie::Create(kTestCookieURL, "a=b",
- base::Time::Now(), options));
+
+ scoped_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create(
+ kTestCookieURL, "a=b", base::Time::Now(), options));
+ cookies.push_back(cookie.release());
+
// Some canonical cookies cannot be converted into System cookies, for
// example if value is not valid utf8. Such cookies are ignored.
net::CanonicalCookie* bad_canonical_cookie = new net::CanonicalCookie(
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698