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 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 &group_name)) { | 815 &group_name)) { |
816 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(trial_name, | 816 ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial(trial_name, |
817 group_name); | 817 group_name); |
818 } | 818 } |
819 | 819 |
820 g_browser_process->GetMetricsServicesManager()->UpdateUploadPermissions(true); | 820 g_browser_process->GetMetricsServicesManager()->UpdateUploadPermissions(true); |
821 } | 821 } |
822 | 822 |
823 void ChromeBrowserMainParts::RecordBrowserStartupTime() { | 823 void ChromeBrowserMainParts::RecordBrowserStartupTime() { |
824 // Don't record any metrics if UI was displayed before this point e.g. | 824 // Don't record any metrics if UI was displayed before this point e.g. |
825 // warning dialogs. | 825 // warning dialogs or browser was started in background mode. |
826 if (startup_metric_utils::WasNonBrowserUIDisplayed()) | 826 if (startup_metric_utils::WasMainWindowStartupInterrupted()) |
827 return; | 827 return; |
828 | 828 |
829 bool is_first_run = false; | 829 bool is_first_run = false; |
830 #if !defined(OS_ANDROID) | 830 #if !defined(OS_ANDROID) |
831 // On Android, first run is handled in Java code, and the C++ side of Chrome | 831 // On Android, first run is handled in Java code, and the C++ side of Chrome |
832 // doesn't know if this is the first run. This will cause some inaccuracy in | 832 // doesn't know if this is the first run. This will cause some inaccuracy in |
833 // the UMA statistics, but this should be minor (first runs are rare). | 833 // the UMA statistics, but this should be minor (first runs are rare). |
834 is_first_run = first_run::IsChromeFirstRun(); | 834 is_first_run = first_run::IsChromeFirstRun(); |
835 #endif // defined(OS_ANDROID) | 835 #endif // defined(OS_ANDROID) |
836 | 836 |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 chromeos::CrosSettings::Shutdown(); | 2076 chromeos::CrosSettings::Shutdown(); |
2077 #endif // defined(OS_CHROMEOS) | 2077 #endif // defined(OS_CHROMEOS) |
2078 #endif // defined(OS_ANDROID) | 2078 #endif // defined(OS_ANDROID) |
2079 } | 2079 } |
2080 | 2080 |
2081 // Public members: | 2081 // Public members: |
2082 | 2082 |
2083 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2083 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2084 chrome_extra_parts_.push_back(parts); | 2084 chrome_extra_parts_.push_back(parts); |
2085 } | 2085 } |
OLD | NEW |