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

Unified Diff: services/ui/ws/focus_controller.cc

Issue 2365753003: mus ws: Move 'reset(new' to base::MakeUnique. (Closed)
Patch Set: Merge with tot Created 4 years, 3 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 | « services/ui/ws/event_dispatcher_unittest.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/focus_controller.cc
diff --git a/services/ui/ws/focus_controller.cc b/services/ui/ws/focus_controller.cc
index 46577291b6a78d441d73a8bb89411c3c51bfb8b5..ad9685b4d4d938269d1fb295701b583ff1562719 100644
--- a/services/ui/ws/focus_controller.cc
+++ b/services/ui/ws/focus_controller.cc
@@ -140,7 +140,7 @@ void FocusController::SetActiveWindow(ServerWindow* window,
cycle_windows_.reset();
} else if (activation_reason_ != ActivationChangeReason::CYCLE) {
DCHECK(!cycle_windows_);
- cycle_windows_.reset(new ServerWindowTracker());
+ cycle_windows_ = base::MakeUnique<ServerWindowTracker>();
if (active_window_)
cycle_windows_->Add(active_window_);
}
@@ -235,10 +235,12 @@ bool FocusController::SetFocusedWindowImpl(
ServerWindow* track_window = focused_window_;
if (!track_window)
track_window = active_window_;
- if (track_window)
- drawn_tracker_.reset(new ServerWindowDrawnTracker(track_window, this));
- else
+ if (track_window) {
+ drawn_tracker_ =
+ base::MakeUnique<ServerWindowDrawnTracker>(track_window, this);
+ } else {
drawn_tracker_.reset();
+ }
return true;
}
« no previous file with comments | « services/ui/ws/event_dispatcher_unittest.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698