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

Side by Side Diff: ash/metrics/task_switch_metrics_recorder.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 #include "base/memory/ptr_util.h"
9 9
10 namespace ash { 10 namespace ash {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return kTabStripHistogramName; 48 return kTabStripHistogramName;
49 case TaskSwitchMetricsRecorder::WINDOW_CYCLE_CONTROLLER: 49 case TaskSwitchMetricsRecorder::WINDOW_CYCLE_CONTROLLER:
50 return kAcceleratorWindowCycleHistogramName; 50 return kAcceleratorWindowCycleHistogramName;
51 } 51 }
52 NOTREACHED(); 52 NOTREACHED();
53 return nullptr; 53 return nullptr;
54 } 54 }
55 55
56 } // namespace 56 } // namespace
57 57
58 TaskSwitchMetricsRecorder::TaskSwitchMetricsRecorder() { 58 TaskSwitchMetricsRecorder::TaskSwitchMetricsRecorder() {}
59 }
60 59
61 TaskSwitchMetricsRecorder::~TaskSwitchMetricsRecorder() { 60 TaskSwitchMetricsRecorder::~TaskSwitchMetricsRecorder() {}
62 }
63 61
64 void TaskSwitchMetricsRecorder::OnTaskSwitch( 62 void TaskSwitchMetricsRecorder::OnTaskSwitch(
65 TaskSwitchSource task_switch_source) { 63 TaskSwitchSource task_switch_source) {
66 DCHECK_NE(task_switch_source, ANY); 64 DCHECK_NE(task_switch_source, ANY);
67 if (task_switch_source != ANY) { 65 if (task_switch_source != ANY) {
68 OnTaskSwitchInternal(task_switch_source); 66 OnTaskSwitchInternal(task_switch_source);
69 OnTaskSwitchInternal(ANY); 67 OnTaskSwitchInternal(ANY);
70 } 68 }
71 } 69 }
72 70
(...skipping 21 matching lines...) Expand all
94 92
95 const char* histogram_name = GetHistogramName(task_switch_source); 93 const char* histogram_name = GetHistogramName(task_switch_source);
96 DCHECK(histogram_name); 94 DCHECK(histogram_name);
97 95
98 histogram_map_.add( 96 histogram_map_.add(
99 task_switch_source, 97 task_switch_source,
100 base::WrapUnique(new TaskSwitchTimeTracker(histogram_name))); 98 base::WrapUnique(new TaskSwitchTimeTracker(histogram_name)));
101 } 99 }
102 100
103 } // namespace ash 101 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/desktop_task_switch_metric_recorder_unittest.cc ('k') | ash/metrics/task_switch_metrics_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698