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

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

Issue 1558203003: Add Startup.TimeSinceLastStartup histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@uptime
Patch Set: 50 buckets, ignore negative values. 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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 // doesn't know if this is the first run. This will cause some inaccuracy in 797 // doesn't know if this is the first run. This will cause some inaccuracy in
798 // the UMA statistics, but this should be minor (first runs are rare). 798 // the UMA statistics, but this should be minor (first runs are rare).
799 // TODO(bshe): Figure out which first run code to use for Aura Android. See 799 // TODO(bshe): Figure out which first run code to use for Aura Android. See
800 // crbug.com/560498 800 // crbug.com/560498
801 is_first_run = first_run::IsChromeFirstRun(); 801 is_first_run = first_run::IsChromeFirstRun();
802 #endif // defined(OS_ANDROID) 802 #endif // defined(OS_ANDROID)
803 803
804 // Record collected startup metrics. 804 // Record collected startup metrics.
805 startup_metric_utils::RecordBrowserMainMessageLoopStart( 805 startup_metric_utils::RecordBrowserMainMessageLoopStart(
806 base::TimeTicks::Now(), is_first_run); 806 base::TimeTicks::Now(), is_first_run);
807
808 startup_metric_utils::RecordTimeSinceLastStartup(
809 g_browser_process->local_state());
807 } 810 }
808 811
809 // ----------------------------------------------------------------------------- 812 // -----------------------------------------------------------------------------
810 // TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts. 813 // TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts.
811 814
812 #if defined(OS_WIN) 815 #if defined(OS_WIN)
813 #define DLLEXPORT __declspec(dllexport) 816 #define DLLEXPORT __declspec(dllexport)
814 817
815 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. 818 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling.
816 extern "C" { 819 extern "C" {
(...skipping 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1910 chromeos::CrosSettings::Shutdown(); 1913 chromeos::CrosSettings::Shutdown();
1911 #endif // defined(OS_CHROMEOS) 1914 #endif // defined(OS_CHROMEOS)
1912 #endif // defined(OS_ANDROID) 1915 #endif // defined(OS_ANDROID)
1913 } 1916 }
1914 1917
1915 // Public members: 1918 // Public members:
1916 1919
1917 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1920 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1918 chrome_extra_parts_.push_back(parts); 1921 chrome_extra_parts_.push_back(parts);
1919 } 1922 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/browser_prefs.cc » ('j') | components/startup_metric_utils/browser/startup_metric_utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698