aw_field_trials.cc 696 B

12345678910111213141516171819
  1. // Copyright 2020 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "android_webview/browser/aw_field_trials.h"
  5. #include "base/base_paths_android.h"
  6. #include "base/feature_list.h"
  7. #include "base/metrics/persistent_histogram_allocator.h"
  8. #include "base/path_service.h"
  9. #include "components/metrics/persistent_histograms.h"
  10. void AwFieldTrials::SetUpFieldTrials() {
  11. // Persistent histograms must be enabled as soon as possible.
  12. base::FilePath metrics_dir;
  13. if (base::PathService::Get(base::DIR_ANDROID_APP_DATA, &metrics_dir)) {
  14. InstantiatePersistentHistograms(metrics_dir);
  15. }
  16. }