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

Unified Diff: components/ntp_snippets/ntp_snippets_service.h

Issue 1918083002: Convert //components/[f-n]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: … 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 | « components/ntp_snippets/ntp_snippets_fetcher.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/ntp_snippets_service.h
diff --git a/components/ntp_snippets/ntp_snippets_service.h b/components/ntp_snippets/ntp_snippets_service.h
index e5e7282b915d61c23d584c08b2fa942e5bbe81af..e0eafaf90bce3e7c2efb7c190e47bc4af953630b 100644
--- a/components/ntp_snippets/ntp_snippets_service.h
+++ b/components/ntp_snippets/ntp_snippets_service.h
@@ -7,6 +7,7 @@
#include <stddef.h>
+#include <memory>
#include <set>
#include <string>
#include <vector>
@@ -43,12 +44,12 @@ class NTPSnippetsServiceObserver;
// Stores and vends fresh content data for the NTP.
class NTPSnippetsService : public KeyedService {
public:
- using NTPSnippetStorage = std::vector<scoped_ptr<NTPSnippet>>;
+ using NTPSnippetStorage = std::vector<std::unique_ptr<NTPSnippet>>;
using const_iterator =
InnerIterator<NTPSnippetStorage::const_iterator, const NTPSnippet>;
// Callbacks for JSON parsing.
- using SuccessCallback = base::Callback<void(scoped_ptr<base::Value>)>;
+ using SuccessCallback = base::Callback<void(std::unique_ptr<base::Value>)>;
using ErrorCallback = base::Callback<void(const std::string&)>;
using ParseJSONCallback = base::Callback<
void(const std::string&, const SuccessCallback&, const ErrorCallback&)>;
@@ -62,7 +63,7 @@ class NTPSnippetsService : public KeyedService {
scoped_refptr<base::SequencedTaskRunner> file_task_runner,
const std::string& application_language_code,
NTPSnippetsScheduler* scheduler,
- scoped_ptr<NTPSnippetsFetcher> snippets_fetcher,
+ std::unique_ptr<NTPSnippetsFetcher> snippets_fetcher,
const ParseJSONCallback& parse_json_callback);
~NTPSnippetsService() override;
@@ -135,7 +136,7 @@ class NTPSnippetsService : public KeyedService {
const std::string& status);
void OnJsonParsed(const std::string& snippets_json,
- scoped_ptr<base::Value> parsed);
+ std::unique_ptr<base::Value> parsed);
void OnJsonError(const std::string& snippets_json, const std::string& error);
// Expects a top-level dictionary containing a "recos" list, which will be
@@ -189,13 +190,14 @@ class NTPSnippetsService : public KeyedService {
// update to the set of snippets.
using SuggestionsSubscription =
suggestions::SuggestionsService::ResponseCallbackList::Subscription;
- scoped_ptr<SuggestionsSubscription> suggestions_service_subscription_;
+ std::unique_ptr<SuggestionsSubscription> suggestions_service_subscription_;
// The snippets fetcher.
- scoped_ptr<NTPSnippetsFetcher> snippets_fetcher_;
+ std::unique_ptr<NTPSnippetsFetcher> snippets_fetcher_;
// The subscription to the snippets fetcher.
- scoped_ptr<NTPSnippetsFetcher::SnippetsAvailableCallbackList::Subscription>
+ std::unique_ptr<
+ NTPSnippetsFetcher::SnippetsAvailableCallbackList::Subscription>
snippets_fetcher_subscription_;
std::string last_fetch_status_;
« no previous file with comments | « components/ntp_snippets/ntp_snippets_fetcher.cc ('k') | components/ntp_snippets/ntp_snippets_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698