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

Unified Diff: net/cookies/canonical_cookie.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu 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 | « net/cookies/canonical_cookie.h ('k') | net/cookies/canonical_cookie_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/canonical_cookie.cc
diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc
index bce2b5477faf484505a964b5769eb721b3fd8de4..1572cc1e793da554428406cd87f83bae37bd0cd6 100644
--- a/net/cookies/canonical_cookie.cc
+++ b/net/cookies/canonical_cookie.cc
@@ -46,6 +46,7 @@
#include "base/format_macros.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -192,7 +193,7 @@ Time CanonicalCookie::CanonExpiration(const ParsedCookie& pc,
}
// static
-scoped_ptr<CanonicalCookie> CanonicalCookie::Create(
+std::unique_ptr<CanonicalCookie> CanonicalCookie::Create(
const GURL& url,
const std::string& cookie_line,
const base::Time& creation_time,
@@ -245,7 +246,7 @@ scoped_ptr<CanonicalCookie> CanonicalCookie::Create(
return nullptr;
}
- return make_scoped_ptr(new CanonicalCookie(
+ return base::WrapUnique(new CanonicalCookie(
url, parsed_cookie.Name(), parsed_cookie.Value(), cookie_domain,
cookie_path, creation_time, cookie_expires, creation_time,
parsed_cookie.IsSecure(), parsed_cookie.IsHttpOnly(),
@@ -253,7 +254,7 @@ scoped_ptr<CanonicalCookie> CanonicalCookie::Create(
}
// static
-scoped_ptr<CanonicalCookie> CanonicalCookie::Create(
+std::unique_ptr<CanonicalCookie> CanonicalCookie::Create(
const GURL& url,
const std::string& name,
const std::string& value,
@@ -304,7 +305,7 @@ scoped_ptr<CanonicalCookie> CanonicalCookie::Create(
cookie_path = std::string(canon_path.data() + canon_path_component.begin,
canon_path_component.len);
- return make_scoped_ptr(new CanonicalCookie(
+ return base::WrapUnique(new CanonicalCookie(
url, parsed_name, parsed_value, cookie_domain, cookie_path, creation,
expiration, creation, secure, http_only, same_site, priority));
}
« no previous file with comments | « net/cookies/canonical_cookie.h ('k') | net/cookies/canonical_cookie_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698