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

Unified Diff: components/dom_distiller/core/viewer.cc

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
« no previous file with comments | « components/dom_distiller/core/viewer.h ('k') | components/dom_distiller/core/viewer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/viewer.cc
diff --git a/components/dom_distiller/core/viewer.cc b/components/dom_distiller/core/viewer.cc
index f0ebdc934deb23d013843300800f51f5875f2ff5..9cac0c5138bd9d7848654d668193956b0ded44ce 100644
--- a/components/dom_distiller/core/viewer.cc
+++ b/components/dom_distiller/core/viewer.cc
@@ -4,11 +4,11 @@
#include "components/dom_distiller/core/viewer.h"
+#include <memory>
#include <string>
#include <vector>
#include "base/json/json_writer.h"
-#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -267,7 +267,7 @@ const std::string GetJavaScript() {
.as_string();
}
-scoped_ptr<ViewerHandle> CreateViewRequest(
+std::unique_ptr<ViewerHandle> CreateViewRequest(
DomDistillerServiceInterface* dom_distiller_service,
const std::string& path,
ViewRequestDelegate* view_request_delegate,
@@ -285,7 +285,7 @@ scoped_ptr<ViewerHandle> CreateViewRequest(
if (has_valid_entry_id && has_valid_url) {
// It is invalid to specify a query param for both |kEntryIdKey| and
// |kUrlKey|.
- return scoped_ptr<ViewerHandle>();
+ return std::unique_ptr<ViewerHandle>();
}
if (has_valid_entry_id) {
@@ -301,7 +301,7 @@ scoped_ptr<ViewerHandle> CreateViewRequest(
}
// It is invalid to not specify a query param for |kEntryIdKey| or |kUrlKey|.
- return scoped_ptr<ViewerHandle>();
+ return std::unique_ptr<ViewerHandle>();
}
const std::string GetDistilledPageThemeJs(DistilledPagePrefs::Theme theme) {
« no previous file with comments | « components/dom_distiller/core/viewer.h ('k') | components/dom_distiller/core/viewer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698