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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_controller.cc

Issue 1867223004: Convert //ash from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/maximize_mode/maximize_mode_controller.h" 5 #include "ash/wm/maximize_mode/maximize_mode_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/accelerators/accelerator_table.h" 10 #include "ash/accelerators/accelerator_table.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (last_lid_open_time_.is_null()) 409 if (last_lid_open_time_.is_null())
410 return false; 410 return false;
411 411
412 base::TimeTicks now = tick_clock_->NowTicks(); 412 base::TimeTicks now = tick_clock_->NowTicks();
413 DCHECK(now >= last_lid_open_time_); 413 DCHECK(now >= last_lid_open_time_);
414 base::TimeDelta elapsed_time = now - last_lid_open_time_; 414 base::TimeDelta elapsed_time = now - last_lid_open_time_;
415 return elapsed_time.InSeconds() <= kLidRecentlyOpenedDurationSeconds; 415 return elapsed_time.InSeconds() <= kLidRecentlyOpenedDurationSeconds;
416 } 416 }
417 417
418 void MaximizeModeController::SetTickClockForTest( 418 void MaximizeModeController::SetTickClockForTest(
419 scoped_ptr<base::TickClock> tick_clock) { 419 std::unique_ptr<base::TickClock> tick_clock) {
420 DCHECK(tick_clock_); 420 DCHECK(tick_clock_);
421 tick_clock_ = std::move(tick_clock); 421 tick_clock_ = std::move(tick_clock);
422 } 422 }
423 423
424 } // namespace ash 424 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_controller.h ('k') | ash/wm/maximize_mode/maximize_mode_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698