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

Unified Diff: components/ntp_snippets/ntp_snippet.cc

Issue 1851933002: Convert //url to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IWYU fixup 7 Created 4 years, 9 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: components/ntp_snippets/ntp_snippet.cc
diff --git a/components/ntp_snippets/ntp_snippet.cc b/components/ntp_snippets/ntp_snippet.cc
index 94616dbc01d49a6432d817d38301f6ba034791d6..d21e4913fd1a0d9e7baee767990326068f33f510 100644
--- a/components/ntp_snippets/ntp_snippet.cc
+++ b/components/ntp_snippets/ntp_snippet.cc
@@ -29,7 +29,7 @@ NTPSnippet::NTPSnippet(const GURL& url) : url_(url) {
NTPSnippet::~NTPSnippet() {}
// static
-scoped_ptr<NTPSnippet> NTPSnippet::CreateFromDictionary(
+std::unique_ptr<NTPSnippet> NTPSnippet::CreateFromDictionary(
const base::DictionaryValue& dict) {
// Need at least the url.
std::string url_str;
@@ -39,7 +39,7 @@ scoped_ptr<NTPSnippet> NTPSnippet::CreateFromDictionary(
if (!url.is_valid())
return nullptr;
- scoped_ptr<NTPSnippet> snippet(new NTPSnippet(url));
+ std::unique_ptr<NTPSnippet> snippet(new NTPSnippet(url));
std::string site_title;
if (dict.GetString(kSiteTitle, &site_title))
@@ -83,8 +83,8 @@ scoped_ptr<NTPSnippet> NTPSnippet::CreateFromDictionary(
return snippet;
}
-scoped_ptr<base::DictionaryValue> NTPSnippet::ToDictionary() const {
- scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
+std::unique_ptr<base::DictionaryValue> NTPSnippet::ToDictionary() const {
+ std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
dict->SetString(kUrl, url_.spec());
if (!site_title_.empty())
« no previous file with comments | « components/ntp_snippets/ntp_snippet.h ('k') | components/password_manager/core/common/credential_manager_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698