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

Unified Diff: components/dom_distiller/core/task_tracker.h

Issue 1879613003: Convert //components/dom_distiller 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
Index: components/dom_distiller/core/task_tracker.h
diff --git a/components/dom_distiller/core/task_tracker.h b/components/dom_distiller/core/task_tracker.h
index 2a59c5b1c16e05e32cb1235df47959f8e6d7be65..14ebd11def6585c0d9e0a58cae77d40638d0e2f6 100644
--- a/components/dom_distiller/core/task_tracker.h
+++ b/components/dom_distiller/core/task_tracker.h
@@ -84,7 +84,7 @@ class TaskTracker {
// |factory| will not be stored after this call.
void StartDistiller(DistillerFactory* factory,
- scoped_ptr<DistillerPage> distiller_page);
+ std::unique_ptr<DistillerPage> distiller_page);
void StartBlobFetcher();
void AddSaveCallback(const SaveCallback& callback);
@@ -92,7 +92,7 @@ class TaskTracker {
void CancelSaveCallbacks();
// The ViewerHandle should be destroyed before the ViewRequestDelegate.
- scoped_ptr<ViewerHandle> AddViewer(ViewRequestDelegate* delegate);
+ std::unique_ptr<ViewerHandle> AddViewer(ViewRequestDelegate* delegate);
const std::string& GetEntryId() const;
bool HasEntryId(const std::string& entry_id) const;
@@ -102,14 +102,15 @@ class TaskTracker {
void OnArticleDistillationUpdated(
const ArticleDistillationUpdate& article_update);
- void OnDistillerFinished(scoped_ptr<DistilledArticleProto> distilled_article);
+ void OnDistillerFinished(
+ std::unique_ptr<DistilledArticleProto> distilled_article);
void OnBlobFetched(bool success,
- scoped_ptr<DistilledArticleProto> distilled_article);
+ std::unique_ptr<DistilledArticleProto> distilled_article);
void RemoveViewer(ViewRequestDelegate* delegate);
void DistilledArticleReady(
- scoped_ptr<DistilledArticleProto> distilled_article);
+ std::unique_ptr<DistilledArticleProto> distilled_article);
// Posts a task to run DoSaveCallbacks with |distillation_succeeded|.
void ScheduleSaveCallbacks(bool distillation_succeeded);
@@ -137,11 +138,11 @@ class TaskTracker {
// made and removed when the corresponding ViewerHandle is destroyed.
std::vector<ViewRequestDelegate*> viewers_;
- scoped_ptr<Distiller> distiller_;
+ std::unique_ptr<Distiller> distiller_;
bool blob_fetcher_running_;
ArticleEntry entry_;
- scoped_ptr<DistilledArticleProto> distilled_article_;
+ std::unique_ptr<DistilledArticleProto> distilled_article_;
bool content_ready_;
« no previous file with comments | « components/dom_distiller/core/page_features_unittest.cc ('k') | components/dom_distiller/core/task_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698