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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 #if !defined(OS_ANDROID) | 787 #if !defined(OS_ANDROID) |
788 // On Android, first run is handled in Java code, and the C++ side of Chrome | 788 // On Android, first run is handled in Java code, and the C++ side of Chrome |
789 // doesn't know if this is the first run. This will cause some inaccuracy in | 789 // doesn't know if this is the first run. This will cause some inaccuracy in |
790 // the UMA statistics, but this should be minor (first runs are rare). | 790 // the UMA statistics, but this should be minor (first runs are rare). |
791 is_first_run = first_run::IsChromeFirstRun(); | 791 is_first_run = first_run::IsChromeFirstRun(); |
792 #endif // defined(OS_ANDROID) | 792 #endif // defined(OS_ANDROID) |
793 | 793 |
794 // Record collected startup metrics. | 794 // Record collected startup metrics. |
795 startup_metric_utils::RecordBrowserMainMessageLoopStart( | 795 startup_metric_utils::RecordBrowserMainMessageLoopStart( |
796 base::TimeTicks::Now(), is_first_run); | 796 base::TimeTicks::Now(), is_first_run); |
797 | |
798 startup_metric_utils::RecordTimeSinceLastStartup( | 797 startup_metric_utils::RecordTimeSinceLastStartup( |
799 g_browser_process->local_state()); | 798 g_browser_process->local_state()); |
| 799 startup_metric_utils::RecordStartupCount(g_browser_process->local_state()); |
800 } | 800 } |
801 | 801 |
802 // ----------------------------------------------------------------------------- | 802 // ----------------------------------------------------------------------------- |
803 // TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts. | 803 // TODO(viettrungluu): move more/rest of BrowserMain() into BrowserMainParts. |
804 | 804 |
805 #if defined(OS_WIN) | 805 #if defined(OS_WIN) |
806 #define DLLEXPORT __declspec(dllexport) | 806 #define DLLEXPORT __declspec(dllexport) |
807 | 807 |
808 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. | 808 // We use extern C for the prototype DLLEXPORT to avoid C++ name mangling. |
809 extern "C" { | 809 extern "C" { |
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1881 chromeos::CrosSettings::Shutdown(); | 1881 chromeos::CrosSettings::Shutdown(); |
1882 #endif // defined(OS_CHROMEOS) | 1882 #endif // defined(OS_CHROMEOS) |
1883 #endif // defined(OS_ANDROID) | 1883 #endif // defined(OS_ANDROID) |
1884 } | 1884 } |
1885 | 1885 |
1886 // Public members: | 1886 // Public members: |
1887 | 1887 |
1888 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1888 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1889 chrome_extra_parts_.push_back(parts); | 1889 chrome_extra_parts_.push_back(parts); |
1890 } | 1890 } |
OLD | NEW |