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

Side by Side Diff: ash/metrics/task_switch_metrics_recorder.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/metrics/task_switch_metrics_recorder.h" 5 #include "ash/metrics/task_switch_metrics_recorder.h"
6 6
7 #include "ash/metrics/task_switch_time_tracker.h" 7 #include "ash/metrics/task_switch_time_tracker.h"
8 #include "base/memory/ptr_util.h"
8 9
9 namespace ash { 10 namespace ash {
10 11
11 namespace { 12 namespace {
12 13
13 const char kAshTaskSwitchHistogramName[] = "Ash.TimeBetweenTaskSwitches"; 14 const char kAshTaskSwitchHistogramName[] = "Ash.TimeBetweenTaskSwitches";
14 15
15 const char kDesktopHistogramName[] = 16 const char kDesktopHistogramName[] =
16 "Ash.Desktop.TimeBetweenNavigateToTaskSwitches"; 17 "Ash.Desktop.TimeBetweenNavigateToTaskSwitches";
17 18
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 90
90 void TaskSwitchMetricsRecorder::AddTaskSwitchTimeTracker( 91 void TaskSwitchMetricsRecorder::AddTaskSwitchTimeTracker(
91 TaskSwitchSource task_switch_source) { 92 TaskSwitchSource task_switch_source) {
92 CHECK(histogram_map_.find(task_switch_source) == histogram_map_.end()); 93 CHECK(histogram_map_.find(task_switch_source) == histogram_map_.end());
93 94
94 const char* histogram_name = GetHistogramName(task_switch_source); 95 const char* histogram_name = GetHistogramName(task_switch_source);
95 DCHECK(histogram_name); 96 DCHECK(histogram_name);
96 97
97 histogram_map_.add( 98 histogram_map_.add(
98 task_switch_source, 99 task_switch_source,
99 make_scoped_ptr(new TaskSwitchTimeTracker(histogram_name))); 100 base::WrapUnique(new TaskSwitchTimeTracker(histogram_name)));
100 } 101 }
101 102
102 } // namespace ash 103 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/task_switch_metrics_recorder.h ('k') | ash/metrics/task_switch_metrics_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698