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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 1637493002: Add SameVersionStartupCounts suffix to startup HardFault and Temperature histograms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b1_startup_count_metric
Patch Set: Created 4 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 bool is_first_run = false; 785 bool is_first_run = false;
786 #if !defined(OS_ANDROID) 786 #if !defined(OS_ANDROID)
787 // On Android, first run is handled in Java code, and the C++ side of Chrome 787 // On Android, first run is handled in Java code, and the C++ side of Chrome
788 // doesn't know if this is the first run. This will cause some inaccuracy in 788 // doesn't know if this is the first run. This will cause some inaccuracy in
789 // the UMA statistics, but this should be minor (first runs are rare). 789 // the UMA statistics, but this should be minor (first runs are rare).
790 is_first_run = first_run::IsChromeFirstRun(); 790 is_first_run = first_run::IsChromeFirstRun();
791 #endif // defined(OS_ANDROID) 791 #endif // defined(OS_ANDROID)
792 792
793 // Record collected startup metrics. 793 // Record collected startup metrics.
794 startup_metric_utils::RecordBrowserMainMessageLoopStart( 794 startup_metric_utils::RecordBrowserMainMessageLoopStart(
795 base::TimeTicks::Now(), is_first_run); 795 base::TimeTicks::Now(), is_first_run, g_browser_process->local_state());
fdoray 2016/01/25 18:48:00 You will need to update this call site: https://co
gab 2016/01/25 21:20:16 Argh.. @msw: is there an equivalent to local_state
msw 2016/01/25 21:29:44 No, not afaik, but you can just pass a null base::
gab 2016/01/25 21:32:26 Was hoping not to add special code on our side for
796 startup_metric_utils::RecordTimeSinceLastStartup(
797 g_browser_process->local_state());
798 startup_metric_utils::RecordStartupCount(g_browser_process->local_state());
799 } 796 }
800 797
801 // ----------------------------------------------------------------------------- 798 // -----------------------------------------------------------------------------
802 // TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts. 799 // TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts.
803 800
804 #if defined(OS_WIN) 801 #if defined(OS_WIN)
805 #define DLLEXPORT __declspec(dllexport) 802 #define DLLEXPORT __declspec(dllexport)
806 803
807 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. 804 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling.
808 extern "C" { 805 extern "C" {
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1877 chromeos::CrosSettings::Shutdown(); 1874 chromeos::CrosSettings::Shutdown();
1878 #endif // defined(OS_CHROMEOS) 1875 #endif // defined(OS_CHROMEOS)
1879 #endif // defined(OS_ANDROID) 1876 #endif // defined(OS_ANDROID)
1880 } 1877 }
1881 1878
1882 // Public members: 1879 // Public members:
1883 1880
1884 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1881 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1885 chrome_extra_parts_.push_back(parts); 1882 chrome_extra_parts_.push_back(parts);
1886 } 1883 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698