| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" | 5 #include "ios/chrome/browser/metrics/ios_chrome_metrics_service_client.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/logging.h" | 16 #include "base/logging.h" |
| 17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
| 18 #include "base/metrics/histogram_macros.h" | 18 #include "base/metrics/histogram_macros.h" |
| 19 #include "base/process/process_metrics.h" | 19 #include "base/process/process_metrics.h" |
| 20 #include "base/rand_util.h" | 20 #include "base/rand_util.h" |
| 21 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
| 22 #include "base/threading/platform_thread.h" | 22 #include "base/threading/platform_thread.h" |
| 23 #include "base/threading/sequenced_worker_pool.h" | |
| 24 #include "components/browser_sync/profile_sync_service.h" | 23 #include "components/browser_sync/profile_sync_service.h" |
| 25 #include "components/crash/core/common/crash_keys.h" | 24 #include "components/crash/core/common/crash_keys.h" |
| 26 #include "components/history/core/browser/history_service.h" | 25 #include "components/history/core/browser/history_service.h" |
| 27 #include "components/keyed_service/core/service_access_type.h" | 26 #include "components/keyed_service/core/service_access_type.h" |
| 28 #include "components/metrics/call_stack_profile_metrics_provider.h" | 27 #include "components/metrics/call_stack_profile_metrics_provider.h" |
| 29 #include "components/metrics/drive_metrics_provider.h" | 28 #include "components/metrics/drive_metrics_provider.h" |
| 30 #include "components/metrics/metrics_pref_names.h" | 29 #include "components/metrics/metrics_pref_names.h" |
| 31 #include "components/metrics/metrics_reporting_default_state.h" | 30 #include "components/metrics/metrics_reporting_default_state.h" |
| 32 #include "components/metrics/metrics_service.h" | 31 #include "components/metrics/metrics_service.h" |
| 33 #include "components/metrics/net/cellular_logic_helper.h" | 32 #include "components/metrics/net/cellular_logic_helper.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 void IOSChromeMetricsServiceClient::OnSyncPrefsChanged(bool must_purge) { | 367 void IOSChromeMetricsServiceClient::OnSyncPrefsChanged(bool must_purge) { |
| 369 if (!ukm_service_) | 368 if (!ukm_service_) |
| 370 return; | 369 return; |
| 371 if (must_purge) { | 370 if (must_purge) { |
| 372 ukm_service_->Purge(); | 371 ukm_service_->Purge(); |
| 373 ukm_service_->ResetClientId(); | 372 ukm_service_->ResetClientId(); |
| 374 } | 373 } |
| 375 // Signal service manager to enable/disable UKM based on new state. | 374 // Signal service manager to enable/disable UKM based on new state. |
| 376 UpdateRunningServices(); | 375 UpdateRunningServices(); |
| 377 } | 376 } |
| OLD | NEW |