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

Side by Side Diff: components/html_viewer/stats_collection_controller.cc

Issue 1663853003: [Merge M48] "[Merge M49] Add SameVersionStartupCounts suffix to startup HardFault and Temperature h… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge_m48_b2_startupVcount
Patch Set: Created 4 years, 10 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 "components/html_viewer/stats_collection_controller.h" 5 #include "components/html_viewer/stats_collection_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/statistics_recorder.h" 10 #include "base/metrics/statistics_recorder.h"
(...skipping 15 matching lines...) Expand all
26 tracing::StartupPerformanceTimesPtr times) { 26 tracing::StartupPerformanceTimesPtr times) {
27 base::StatisticsRecorder::Initialize(); 27 base::StatisticsRecorder::Initialize();
28 28
29 startup_metric_utils::RecordStartupProcessCreationTime( 29 startup_metric_utils::RecordStartupProcessCreationTime(
30 base::Time::FromInternalValue(times->shell_process_creation_time)); 30 base::Time::FromInternalValue(times->shell_process_creation_time));
31 31
32 // TODO(msw): Record the MojoMain() entry point time of mojo:browser instead? 32 // TODO(msw): Record the MojoMain() entry point time of mojo:browser instead?
33 startup_metric_utils::RecordMainEntryPointTime( 33 startup_metric_utils::RecordMainEntryPointTime(
34 base::Time::FromInternalValue(times->shell_main_entry_point_time)); 34 base::Time::FromInternalValue(times->shell_main_entry_point_time));
35 35
36 // TODO(msw): Determine if this is the first run. 36 // TODO(msw): Determine if this is the first run and provide a PrefService
37 // to generate stats that span multiple startups.
37 startup_metric_utils::RecordBrowserMainMessageLoopStart( 38 startup_metric_utils::RecordBrowserMainMessageLoopStart(
38 base::TimeTicks::FromInternalValue( 39 base::TimeTicks::FromInternalValue(
39 times->browser_message_loop_start_ticks), 40 times->browser_message_loop_start_ticks),
40 false); 41 false, nullptr);
41 42
42 startup_metric_utils::RecordBrowserWindowDisplay( 43 startup_metric_utils::RecordBrowserWindowDisplay(
43 base::TimeTicks::FromInternalValue(times->browser_window_display_ticks)); 44 base::TimeTicks::FromInternalValue(times->browser_window_display_ticks));
44 45
45 startup_metric_utils::RecordBrowserOpenTabsDelta( 46 startup_metric_utils::RecordBrowserOpenTabsDelta(
46 base::TimeDelta::FromInternalValue(times->browser_open_tabs_time_delta)); 47 base::TimeDelta::FromInternalValue(times->browser_open_tabs_time_delta));
47 48
48 startup_metric_utils::RecordFirstWebContentsMainFrameLoad( 49 startup_metric_utils::RecordFirstWebContentsMainFrameLoad(
49 base::TimeTicks::FromInternalValue( 50 base::TimeTicks::FromInternalValue(
50 times->first_web_contents_main_frame_load_ticks)); 51 times->first_web_contents_main_frame_load_ticks));
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 histogram->WriteJSON(&histogram_json); 154 histogram->WriteJSON(&histogram_json);
154 return histogram_json; 155 return histogram_json;
155 } 156 }
156 157
157 std::string StatsCollectionController::GetBrowserHistogram( 158 std::string StatsCollectionController::GetBrowserHistogram(
158 const std::string& histogram_name) { 159 const std::string& histogram_name) {
159 return GetHistogram(histogram_name); 160 return GetHistogram(histogram_name);
160 } 161 }
161 162
162 } // namespace html_viewer 163 } // namespace html_viewer
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | components/startup_metric_utils/browser/startup_metric_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698