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

Unified Diff: components/sessions/content/content_serialized_navigation_builder.cc

Issue 1912843002: Convert //components/sessions 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
Index: components/sessions/content/content_serialized_navigation_builder.cc
diff --git a/components/sessions/content/content_serialized_navigation_builder.cc b/components/sessions/content/content_serialized_navigation_builder.cc
index 021b0e8201a16553822e451a23138a0b28849cc8..072f72e22e95fcee0f7846d451791d35b3459bb4 100644
--- a/components/sessions/content/content_serialized_navigation_builder.cc
+++ b/components/sessions/content/content_serialized_navigation_builder.cc
@@ -44,14 +44,14 @@ ContentSerializedNavigationBuilder::FromNavigationEntry(
}
// static
-scoped_ptr<content::NavigationEntry>
+std::unique_ptr<content::NavigationEntry>
ContentSerializedNavigationBuilder::ToNavigationEntry(
const SerializedNavigationEntry* navigation,
int page_id,
content::BrowserContext* browser_context) {
blink::WebReferrerPolicy policy =
static_cast<blink::WebReferrerPolicy>(navigation->referrer_policy_);
- scoped_ptr<content::NavigationEntry> entry(
+ std::unique_ptr<content::NavigationEntry> entry(
content::NavigationController::CreateNavigationEntry(
navigation->virtual_url_,
content::Referrer::SanitizeForRequest(
@@ -85,12 +85,12 @@ ContentSerializedNavigationBuilder::ToNavigationEntry(
}
// static
-std::vector<scoped_ptr<content::NavigationEntry>>
+std::vector<std::unique_ptr<content::NavigationEntry>>
ContentSerializedNavigationBuilder::ToNavigationEntries(
const std::vector<SerializedNavigationEntry>& navigations,
content::BrowserContext* browser_context) {
int page_id = 0;
- std::vector<scoped_ptr<content::NavigationEntry>> entries;
+ std::vector<std::unique_ptr<content::NavigationEntry>> entries;
entries.reserve(navigations.size());
for (const auto& navigation : navigations) {
entries.push_back(ToNavigationEntry(&navigation, page_id, browser_context));

Powered by Google App Engine
This is Rietveld 408576698