| Index: chrome/browser/metrics/chrome_metrics_services_manager_client.cc
|
| diff --git a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
|
| index 82a5a10ac877320c1b619cf3acae581465813315..186811f8a864a12f8eeab7a1bab34f3ba3a382a4 100644
|
| --- a/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
|
| +++ b/chrome/browser/metrics/chrome_metrics_services_manager_client.cc
|
| @@ -59,9 +59,19 @@ const base::Feature kMetricsReportingFeature{"MetricsReporting",
|
| // Posts |GoogleUpdateSettings::StoreMetricsClientInfo| on blocking pool thread
|
| // because it needs access to IO and cannot work from UI thread.
|
| void PostStoreMetricsClientInfo(const metrics::ClientInfo& client_info) {
|
| - content::BrowserThread::GetBlockingPool()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&GoogleUpdateSettings::StoreMetricsClientInfo, client_info));
|
| + // The message loop processes messages after the blocking pool is initialized.
|
| + // Posting a task to the message loop to post a task to the blocking pool
|
| + // ensures that the blocking pool is ready to accept tasks at that time.
|
| + content::BrowserThread::PostTask(
|
| + content::BrowserThread::UI, FROM_HERE,
|
| + base::Bind(
|
| + [](const metrics::ClientInfo& client_info) {
|
| + content::BrowserThread::PostBlockingPoolTask(
|
| + FROM_HERE,
|
| + base::Bind(&GoogleUpdateSettings::StoreMetricsClientInfo,
|
| + client_info));
|
| + },
|
| + client_info));
|
| }
|
|
|
| // Appends a group to the sampling controlling |trial|. The group will be
|
|
|