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

Unified Diff: content/renderer/history_controller.cc

Issue 1873783003: Convert //content/renderer 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 | « content/renderer/history_controller.h ('k') | content/renderer/history_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/history_controller.cc
diff --git a/content/renderer/history_controller.cc b/content/renderer/history_controller.cc
index 12d0f1b872fc25d7d33c625234b14787784ee10e..c8553ff2e277ecf1fadec475ebd0fdaa588380d2 100644
--- a/content/renderer/history_controller.cc
+++ b/content/renderer/history_controller.cc
@@ -37,6 +37,7 @@
#include <utility>
+#include "base/memory/ptr_util.h"
#include "content/common/navigation_params.h"
#include "content/common/site_isolation_policy.h"
#include "content/renderer/render_frame_impl.h"
@@ -63,8 +64,8 @@ HistoryController::~HistoryController() {
bool HistoryController::GoToEntry(
blink::WebLocalFrame* main_frame,
- scoped_ptr<HistoryEntry> target_entry,
- scoped_ptr<NavigationParams> navigation_params,
+ std::unique_ptr<HistoryEntry> target_entry,
+ std::unique_ptr<NavigationParams> navigation_params,
WebCachePolicy cache_policy) {
DCHECK(!main_frame->parent());
HistoryFrameLoadVector same_document_loads;
@@ -96,8 +97,8 @@ bool HistoryController::GoToEntry(
RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame);
if (!render_frame)
continue;
- render_frame->SetPendingNavigationParams(make_scoped_ptr(
- new NavigationParams(*navigation_params_.get())));
+ render_frame->SetPendingNavigationParams(
+ base::WrapUnique(new NavigationParams(*navigation_params_.get())));
WebURLRequest request = frame->toWebLocalFrame()->requestFromHistoryItem(
item.second, cache_policy);
frame->toWebLocalFrame()->load(
@@ -111,8 +112,8 @@ bool HistoryController::GoToEntry(
RenderFrameImpl* render_frame = RenderFrameImpl::FromWebFrame(frame);
if (!render_frame)
continue;
- render_frame->SetPendingNavigationParams(make_scoped_ptr(
- new NavigationParams(*navigation_params_.get())));
+ render_frame->SetPendingNavigationParams(
+ base::WrapUnique(new NavigationParams(*navigation_params_.get())));
WebURLRequest request = frame->toWebLocalFrame()->requestFromHistoryItem(
item.second, cache_policy);
frame->toWebLocalFrame()->load(
@@ -226,8 +227,8 @@ HistoryEntry* HistoryController::GetCurrentEntry() {
WebHistoryItem HistoryController::GetItemForNewChildFrame(
RenderFrameImpl* frame) const {
if (navigation_params_.get()) {
- frame->SetPendingNavigationParams(make_scoped_ptr(
- new NavigationParams(*navigation_params_.get())));
+ frame->SetPendingNavigationParams(
+ base::WrapUnique(new NavigationParams(*navigation_params_.get())));
}
if (!current_entry_)
« no previous file with comments | « content/renderer/history_controller.h ('k') | content/renderer/history_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698