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

Unified Diff: ios/chrome/browser/net/cookie_util.mm

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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 | « ios/chrome/browser/net/cookie_util.h ('k') | ios/chrome/browser/net/image_fetcher.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/net/cookie_util.mm
diff --git a/ios/chrome/browser/net/cookie_util.mm b/ios/chrome/browser/net/cookie_util.mm
index 6b2520fd82d78f4b6a631e8108507f37018a9cde..7ae29207cd2457d4c843e3f3b37caf4f5b15904d 100644
--- a/ios/chrome/browser/net/cookie_util.mm
+++ b/ios/chrome/browser/net/cookie_util.mm
@@ -10,6 +10,7 @@
#include "base/logging.h"
#import "base/mac/bind_objc_block.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#include "ios/net/cookies/cookie_store_ios.h"
@@ -44,11 +45,11 @@ scoped_refptr<net::SQLitePersistentCookieStore> CreatePersistentCookieStore(
}
// Creates a CookieMonster configured by |config|.
-scoped_ptr<net::CookieMonster> CreateCookieMonster(
+std::unique_ptr<net::CookieMonster> CreateCookieMonster(
const CookieStoreConfig& config) {
if (config.path.empty()) {
// Empty path means in-memory store.
- return make_scoped_ptr(new net::CookieMonster(nullptr, nullptr));
+ return base::WrapUnique(new net::CookieMonster(nullptr, nullptr));
}
const bool restore_old_session_cookies =
@@ -56,7 +57,7 @@ scoped_ptr<net::CookieMonster> CreateCookieMonster(
scoped_refptr<net::SQLitePersistentCookieStore> persistent_store =
CreatePersistentCookieStore(config.path, restore_old_session_cookies,
config.crypto_delegate);
- scoped_ptr<net::CookieMonster> cookie_monster(
+ std::unique_ptr<net::CookieMonster> cookie_monster(
new net::CookieMonster(persistent_store.get(), nullptr));
if (restore_old_session_cookies)
cookie_monster->SetPersistSessionCookies(true);
@@ -78,7 +79,7 @@ CookieStoreConfig::CookieStoreConfig(const base::FilePath& path,
CookieStoreConfig::~CookieStoreConfig() {}
-scoped_ptr<net::CookieStore> CreateCookieStore(
+std::unique_ptr<net::CookieStore> CreateCookieStore(
const CookieStoreConfig& config) {
if (config.cookie_store_type == CookieStoreConfig::COOKIE_MONSTER)
return CreateCookieMonster(config);
@@ -91,7 +92,7 @@ scoped_ptr<net::CookieStore> CreateCookieStore(
config.path, true /* restore_old_session_cookies */,
config.crypto_delegate);
}
- return make_scoped_ptr(new net::CookieStoreIOS(persistent_store.get()));
+ return base::WrapUnique(new net::CookieStoreIOS(persistent_store.get()));
}
bool ShouldClearSessionCookies() {
« no previous file with comments | « ios/chrome/browser/net/cookie_util.h ('k') | ios/chrome/browser/net/image_fetcher.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698