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

Unified Diff: ash/wm/maximize_mode/maximize_mode_window_state.cc

Issue 1547223002: Convert Pass()→std::move() in //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: ash/wm/maximize_mode/maximize_mode_window_state.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_window_state.cc b/ash/wm/maximize_mode/maximize_mode_window_state.cc
index e8da85aa536873d1a9a14398cdbb967b7ddf7675..3691dcaae82eff94c9787602a2dfdd04de968d6a 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_state.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_state.cc
@@ -4,6 +4,8 @@
#include "ash/wm/maximize_mode/maximize_mode_window_state.h"
+#include <utility>
+
#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
@@ -95,9 +97,9 @@ MaximizeModeWindowState::MaximizeModeWindowState(
creator_(creator),
current_state_type_(wm::GetWindowState(window)->GetStateType()),
defer_bounds_updates_(false) {
- old_state_.reset(
- wm::GetWindowState(window)->SetStateObject(
- scoped_ptr<State>(this).Pass()).release());
+ old_state_.reset(wm::GetWindowState(window)
+ ->SetStateObject(scoped_ptr<State>(this))
+ .release());
}
MaximizeModeWindowState::~MaximizeModeWindowState() {
@@ -107,7 +109,7 @@ MaximizeModeWindowState::~MaximizeModeWindowState() {
void MaximizeModeWindowState::LeaveMaximizeMode(wm::WindowState* window_state) {
// Note: When we return we will destroy ourselves with the |our_reference|.
scoped_ptr<wm::WindowState::State> our_reference =
- window_state->SetStateObject(old_state_.Pass());
+ window_state->SetStateObject(std::move(old_state_));
}
void MaximizeModeWindowState::SetDeferBoundsUpdates(bool defer_bounds_updates) {

Powered by Google App Engine
This is Rietveld 408576698