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

Unified Diff: chrome/browser/ui/views/status_icons/status_tray_state_changer_interactive_uitest_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_interactive_uitest_win.cc
diff --git a/chrome/browser/ui/views/status_icons/status_tray_state_changer_interactive_uitest_win.cc b/chrome/browser/ui/views/status_icons/status_tray_state_changer_interactive_uitest_win.cc
index e22a52c850b3f932209c436db8852c7dab29e09e..8ca91bed1325ed94af76cb0f06e05b441c02258e 100644
--- a/chrome/browser/ui/views/status_icons/status_tray_state_changer_interactive_uitest_win.cc
+++ b/chrome/browser/ui/views/status_icons/status_tray_state_changer_interactive_uitest_win.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/views/status_icons/status_tray_state_changer_win.h"
+#include <utility>
+
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/win/scoped_com_initializer.h"
@@ -57,7 +59,7 @@ class StatusTrayStateChangerWinTest : public testing::Test {
DCHECK_EQ(notify_item->hwnd, icon_window());
DCHECK_EQ(notify_item->id, icon_id());
- return notify_item.Pass();
+ return notify_item;
}
bool CallCreateTrayNotify() { return tray_watcher_->CreateTrayNotify(); }
@@ -68,7 +70,7 @@ class StatusTrayStateChangerWinTest : public testing::Test {
}
void SendNotifyItemUpdate(scoped_ptr<NOTIFYITEM> notify_item) {
- tray_watcher_->SendNotifyItemUpdate(notify_item.Pass());
+ tray_watcher_->SendNotifyItemUpdate(std::move(notify_item));
}
scoped_ptr<NOTIFYITEM> GetNotifyItem() {
@@ -108,18 +110,18 @@ TEST_F(StatusTrayStateChangerWinTest, DISABLED_ComApiTest) {
if (notify_item->preference != PREFERENCE_SHOW_WHEN_ACTIVE) {
scoped_ptr<NOTIFYITEM> notify_item_copy(new NOTIFYITEM(*notify_item));
notify_item_copy->preference = PREFERENCE_SHOW_WHEN_ACTIVE;
- SendNotifyItemUpdate(notify_item_copy.Pass());
+ SendNotifyItemUpdate(std::move(notify_item_copy));
}
// Run the interesting code.
tray_watcher_->EnsureTrayIconVisible();
EXPECT_EQ(PREFERENCE_SHOW_ALWAYS, GetNotifyItem()->preference);
- SendNotifyItemUpdate(notify_item.Pass());
+ SendNotifyItemUpdate(std::move(notify_item));
notify_item = GetNotifyItem();
EXPECT_EQ(notify_item->preference, current_preference);
-};
+}
// Test is disabled due to multiple COM initialization errors. See
// http//crbug.com/367199 for details.
@@ -161,7 +163,7 @@ TEST_F(StatusTrayStateChangerWinTest, DISABLED_TraySizeApiTest) {
EXPECT_GT(new_width, width);
- SendNotifyItemUpdate(notify_item.Pass());
+ SendNotifyItemUpdate(std::move(notify_item));
::GetWindowRect(tray_notify_hwnd, &new_tray_notify_rect);
new_width = new_tray_notify_rect.right - new_tray_notify_rect.left;
EXPECT_EQ(width, new_width);

Powered by Google App Engine
This is Rietveld 408576698