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

Unified Diff: ash/accelerators/key_hold_detector.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/accelerators/key_hold_detector.h ('k') | ash/accelerators/magnifier_key_scroller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/key_hold_detector.cc
diff --git a/ash/accelerators/key_hold_detector.cc b/ash/accelerators/key_hold_detector.cc
index 91391502f99be473e8eb61f44d97935a3799d7ce..8e4517fc2fd178eb16bd439984340e516ab13364 100644
--- a/ash/accelerators/key_hold_detector.cc
+++ b/ash/accelerators/key_hold_detector.cc
@@ -17,7 +17,7 @@ namespace ash {
namespace {
void DispatchPressedEvent(const ui::KeyEvent& key_event,
- scoped_ptr<aura::WindowTracker> tracker) {
+ std::unique_ptr<aura::WindowTracker> tracker) {
// The target window may be gone.
if (tracker->windows().empty())
return;
@@ -34,7 +34,7 @@ void PostPressedEvent(ui::KeyEvent* event) {
event->key_code(),
event->code(),
event->flags() | ui::EF_SHIFT_DOWN | ui::EF_IS_SYNTHESIZED);
- scoped_ptr<aura::WindowTracker> tracker(new aura::WindowTracker);
+ std::unique_ptr<aura::WindowTracker> tracker(new aura::WindowTracker);
tracker->Add(static_cast<aura::Window*>(event->target()));
base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -44,7 +44,7 @@ void PostPressedEvent(ui::KeyEvent* event) {
} // namespace
-KeyHoldDetector::KeyHoldDetector(scoped_ptr<Delegate> delegate)
+KeyHoldDetector::KeyHoldDetector(std::unique_ptr<Delegate> delegate)
: state_(INITIAL), delegate_(std::move(delegate)) {}
KeyHoldDetector::~KeyHoldDetector() {}
« no previous file with comments | « ash/accelerators/key_hold_detector.h ('k') | ash/accelerators/magnifier_key_scroller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698