Commit ce305a04 authored by Xi Han's avatar Xi Han Committed by Commit Bot

Move the initialization of System Profile in early startup behind the flag "UmaBackgroundSessions".

It allows a comparison of UMA data lost when Chrome is running in background
and reduced mode.

Bug: 954310
Change-Id: I2d7a6ac4d4eb5b53e043cbbe2e1e217a3a9a1838
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787463Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694310}
parent 087d44d8
...@@ -119,7 +119,7 @@ public final class ServicificationBackgroundServiceTest { ...@@ -119,7 +119,7 @@ public final class ServicificationBackgroundServiceTest {
@Test @Test
@LargeTest @LargeTest
@Feature({"ServicificationStartup"}) @Feature({"ServicificationStartup"})
@CommandLineFlags.Add("force-fieldtrials=*Foo/Bar") @CommandLineFlags.Add({"force-fieldtrials=*Foo/Bar", "enable-features=UMABackgroundSessions"})
public void testHistogramsPersistedWithServiceManagerOnlyStart() { public void testHistogramsPersistedWithServiceManagerOnlyStart() {
createBrowserMetricsSpareFile(); createBrowserMetricsSpareFile();
Assert.assertTrue(mSpareFile.exists()); Assert.assertTrue(mSpareFile.exists());
......
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
#include "base/android/java_exception_reporter.h" #include "base/android/java_exception_reporter.h"
#include "chrome/browser/android/chrome_feature_list.h"
#include "chrome/browser/android/crash/pure_java_exception_handler.h" #include "chrome/browser/android/crash/pure_java_exception_handler.h"
#include "chrome/common/chrome_descriptors.h" #include "chrome/common/chrome_descriptors.h"
#else // defined(OS_ANDROID) #else // defined(OS_ANDROID)
...@@ -548,7 +549,13 @@ void ChromeMainDelegate::PostEarlyInitialization(bool is_running_tests) { ...@@ -548,7 +549,13 @@ void ChromeMainDelegate::PostEarlyInitialization(bool is_running_tests) {
if (base::FeatureList::IsEnabled( if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) { features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
startup_data_->RecordCoreSystemProfile(); bool record = true;
#if defined(OS_ANDROID)
record =
base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions);
#endif
if (record)
startup_data_->RecordCoreSystemProfile();
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment