OLD | NEW |
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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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); |
796 | |
797 startup_metric_utils::RecordTimeSinceLastStartup( | 796 startup_metric_utils::RecordTimeSinceLastStartup( |
798 g_browser_process->local_state()); | 797 g_browser_process->local_state()); |
| 798 startup_metric_utils::RecordStartupCount(g_browser_process->local_state()); |
799 } | 799 } |
800 | 800 |
801 // ----------------------------------------------------------------------------- | 801 // ----------------------------------------------------------------------------- |
802 // TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts. | 802 // TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts. |
803 | 803 |
804 #if defined(OS_WIN) | 804 #if defined(OS_WIN) |
805 #define DLLEXPORT __declspec(dllexport) | 805 #define DLLEXPORT __declspec(dllexport) |
806 | 806 |
807 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. | 807 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. |
808 extern "C" { | 808 extern "C" { |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1872 chromeos::CrosSettings::Shutdown(); | 1872 chromeos::CrosSettings::Shutdown(); |
1873 #endif // defined(OS_CHROMEOS) | 1873 #endif // defined(OS_CHROMEOS) |
1874 #endif // defined(OS_ANDROID) | 1874 #endif // defined(OS_ANDROID) |
1875 } | 1875 } |
1876 | 1876 |
1877 // Public members: | 1877 // Public members: |
1878 | 1878 |
1879 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1879 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1880 chrome_extra_parts_.push_back(parts); | 1880 chrome_extra_parts_.push_back(parts); |
1881 } | 1881 } |
OLD | NEW |