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

Unified Diff: chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc

Issue 1752233002: Convert Pass()→std::move() on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 10 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: chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc
diff --git a/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc b/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc
index 053ac9a0fe4f3756c0c627db32371e765a3e4e51..7021d4037e7795a8e4e272befa46df5ae4dd338e 100644
--- a/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc
+++ b/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/views/status_icons/status_tray_state_changer_win.h"
+#include <utility>
+
namespace {
////////////////////////////////////////////////////////////////////////////////
@@ -78,7 +80,7 @@ void StatusTrayStateChangerWin::EnsureTrayIconVisible() {
notify_item->preference = PREFERENCE_SHOW_ALWAYS;
- SendNotifyItemUpdate(notify_item.Pass());
+ SendNotifyItemUpdate(std::move(notify_item));
}
STDMETHODIMP_(ULONG) StatusTrayStateChangerWin::AddRef() {
@@ -168,10 +170,7 @@ scoped_ptr<NOTIFYITEM> StatusTrayStateChangerWin::RegisterCallback() {
NOTREACHED();
}
- // Adding an intermediate scoped pointer here so that |notify_item_| is reset
- // to NULL.
- scoped_ptr<NOTIFYITEM> rv(notify_item_.release());
- return rv.Pass();
+ return std::move(notify_item_);
}
bool StatusTrayStateChangerWin::RegisterCallbackWin8() {

Powered by Google App Engine
This is Rietveld 408576698