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

Unified Diff: chrome/browser/extensions/api/history/history_api.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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: chrome/browser/extensions/api/history/history_api.cc
diff --git a/chrome/browser/extensions/api/history/history_api.cc b/chrome/browser/extensions/api/history/history_api.cc
index c267fe9ece0236ab3f1dedb760783c7199063736..35d2ce9f80072d580164d936a577e95adca612af 100644
--- a/chrome/browser/extensions/api/history/history_api.cc
+++ b/chrome/browser/extensions/api/history/history_api.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/extensions/api/history/history_api.h"
+#include <utility>
+
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/callback.h"
@@ -71,7 +73,7 @@ scoped_ptr<HistoryItem> GetHistoryItem(const history::URLRow& row) {
history_item->typed_count.reset(new int(row.typed_count()));
history_item->visit_count.reset(new int(row.visit_count()));
- return history_item.Pass();
+ return history_item;
}
scoped_ptr<VisitItem> GetVisitItem(const history::VisitRow& row) {
@@ -124,7 +126,7 @@ scoped_ptr<VisitItem> GetVisitItem(const history::VisitRow& row) {
visit_item->transition = transition;
- return visit_item.Pass();
+ return visit_item;
}
} // namespace
@@ -147,7 +149,7 @@ void HistoryEventRouter::OnURLVisited(history::HistoryService* history_service,
scoped_ptr<HistoryItem> history_item = GetHistoryItem(row);
scoped_ptr<base::ListValue> args = OnVisited::Create(*history_item);
DispatchEvent(profile_, events::HISTORY_ON_VISITED,
- api::history::OnVisited::kEventName, args.Pass());
+ api::history::OnVisited::kEventName, std::move(args));
}
void HistoryEventRouter::OnURLsDeleted(history::HistoryService* history_service,
@@ -165,7 +167,7 @@ void HistoryEventRouter::OnURLsDeleted(history::HistoryService* history_service,
scoped_ptr<base::ListValue> args = OnVisitRemoved::Create(removed);
DispatchEvent(profile_, events::HISTORY_ON_VISIT_REMOVED,
- api::history::OnVisitRemoved::kEventName, args.Pass());
+ api::history::OnVisitRemoved::kEventName, std::move(args));
}
void HistoryEventRouter::DispatchEvent(Profile* profile,
@@ -174,9 +176,9 @@ void HistoryEventRouter::DispatchEvent(Profile* profile,
scoped_ptr<base::ListValue> event_args) {
if (profile && EventRouter::Get(profile)) {
scoped_ptr<Event> event(
- new Event(histogram_value, event_name, event_args.Pass()));
+ new Event(histogram_value, event_name, std::move(event_args)));
event->restrict_to_browser_context = profile;
- EventRouter::Get(profile)->BroadcastEvent(event.Pass());
+ EventRouter::Get(profile)->BroadcastEvent(std::move(event));
}
}
« no previous file with comments | « chrome/browser/extensions/api/gcm/gcm_api.cc ('k') | chrome/browser/extensions/api/hotword_private/hotword_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698