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

Unified Diff: chrome/browser/extensions/api/gcm/gcm_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/gcm/gcm_api.cc
diff --git a/chrome/browser/extensions/api/gcm/gcm_api.cc b/chrome/browser/extensions/api/gcm/gcm_api.cc
index b658e7780b8257fcacb46546913fc9b365b47730..abb68abb8de3c8b97dd5c7314590ba0920fcb398 100644
--- a/chrome/browser/extensions/api/gcm/gcm_api.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_api.cc
@@ -5,9 +5,9 @@
#include "chrome/browser/extensions/api/gcm/gcm_api.h"
#include <stddef.h>
-
#include <algorithm>
#include <map>
+#include <utility>
#include <vector>
#include "base/macros.h"
@@ -219,15 +219,17 @@ void GcmJsEventRouter::OnMessage(const std::string& app_id,
scoped_ptr<Event> event(
new Event(events::GCM_ON_MESSAGE, api::gcm::OnMessage::kEventName,
- api::gcm::OnMessage::Create(message_arg).Pass(), profile_));
- EventRouter::Get(profile_)->DispatchEventToExtension(app_id, event.Pass());
+ api::gcm::OnMessage::Create(message_arg), profile_));
+ EventRouter::Get(profile_)
+ ->DispatchEventToExtension(app_id, std::move(event));
}
void GcmJsEventRouter::OnMessagesDeleted(const std::string& app_id) {
scoped_ptr<Event> event(new Event(
events::GCM_ON_MESSAGES_DELETED, api::gcm::OnMessagesDeleted::kEventName,
- api::gcm::OnMessagesDeleted::Create().Pass(), profile_));
- EventRouter::Get(profile_)->DispatchEventToExtension(app_id, event.Pass());
+ api::gcm::OnMessagesDeleted::Create(), profile_));
+ EventRouter::Get(profile_)
+ ->DispatchEventToExtension(app_id, std::move(event));
}
void GcmJsEventRouter::OnSendError(
@@ -240,8 +242,9 @@ void GcmJsEventRouter::OnSendError(
scoped_ptr<Event> event(
new Event(events::GCM_ON_SEND_ERROR, api::gcm::OnSendError::kEventName,
- api::gcm::OnSendError::Create(error).Pass(), profile_));
- EventRouter::Get(profile_)->DispatchEventToExtension(app_id, event.Pass());
+ api::gcm::OnSendError::Create(error), profile_));
+ EventRouter::Get(profile_)
+ ->DispatchEventToExtension(app_id, std::move(event));
}
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698