| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ios_chrome_main_parts.h" | 5 #include "ios/chrome/browser/ios_chrome_main_parts.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/feature_list.h" | 8 #include "base/feature_list.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/prefs/json_pref_store.h" | |
| 13 #include "base/prefs/pref_service.h" | |
| 14 #include "base/time/default_tick_clock.h" | 12 #include "base/time/default_tick_clock.h" |
| 15 #include "components/content_settings/core/browser/cookie_settings.h" | 13 #include "components/content_settings/core/browser/cookie_settings.h" |
| 16 #include "components/content_settings/core/common/content_settings_pattern.h" | 14 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 17 #include "components/flags_ui/pref_service_flags_storage.h" | 15 #include "components/flags_ui/pref_service_flags_storage.h" |
| 18 #include "components/language_usage_metrics/language_usage_metrics.h" | 16 #include "components/language_usage_metrics/language_usage_metrics.h" |
| 19 #include "components/metrics/metrics_service.h" | 17 #include "components/metrics/metrics_service.h" |
| 20 #include "components/metrics/profiler/ios/ios_tracking_synchronizer_delegate.h" | 18 #include "components/metrics/profiler/ios/ios_tracking_synchronizer_delegate.h" |
| 21 #include "components/metrics/profiler/tracking_synchronizer.h" | 19 #include "components/metrics/profiler/tracking_synchronizer.h" |
| 22 #include "components/metrics_services_manager/metrics_services_manager.h" | 20 #include "components/metrics_services_manager/metrics_services_manager.h" |
| 23 #include "components/open_from_clipboard/clipboard_recent_content.h" | 21 #include "components/open_from_clipboard/clipboard_recent_content.h" |
| 22 #include "components/prefs/json_pref_store.h" |
| 23 #include "components/prefs/pref_service.h" |
| 24 #include "components/rappor/rappor_service.h" | 24 #include "components/rappor/rappor_service.h" |
| 25 #include "components/translate/core/browser/translate_download_manager.h" | 25 #include "components/translate/core/browser/translate_download_manager.h" |
| 26 #include "components/variations/service/variations_service.h" | 26 #include "components/variations/service/variations_service.h" |
| 27 #include "components/variations/variations_http_header_provider.h" | 27 #include "components/variations/variations_http_header_provider.h" |
| 28 #include "ios/chrome/browser/about_flags.h" | 28 #include "ios/chrome/browser/about_flags.h" |
| 29 #include "ios/chrome/browser/application_context_impl.h" | 29 #include "ios/chrome/browser/application_context_impl.h" |
| 30 #include "ios/chrome/browser/chrome_paths.h" | 30 #include "ios/chrome/browser/chrome_paths.h" |
| 31 #include "ios/chrome/browser/chrome_switches.h" | 31 #include "ios/chrome/browser/chrome_switches.h" |
| 32 #include "ios/chrome/browser/chrome_url_constants.h" | 32 #include "ios/chrome/browser/chrome_url_constants.h" |
| 33 #import "ios/chrome/browser/first_run/first_run.h" | 33 #import "ios/chrome/browser/first_run/first_run.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 void IOSChromeMainParts::StartMetricsRecording() { | 243 void IOSChromeMainParts::StartMetricsRecording() { |
| 244 bool wifiOnly = local_state_->GetBoolean(prefs::kMetricsReportingWifiOnly); | 244 bool wifiOnly = local_state_->GetBoolean(prefs::kMetricsReportingWifiOnly); |
| 245 bool isConnectionCellular = net::NetworkChangeNotifier::IsConnectionCellular( | 245 bool isConnectionCellular = net::NetworkChangeNotifier::IsConnectionCellular( |
| 246 net::NetworkChangeNotifier::GetConnectionType()); | 246 net::NetworkChangeNotifier::GetConnectionType()); |
| 247 bool mayUpload = !wifiOnly || !isConnectionCellular; | 247 bool mayUpload = !wifiOnly || !isConnectionCellular; |
| 248 | 248 |
| 249 application_context_->GetMetricsServicesManager()->UpdateUploadPermissions( | 249 application_context_->GetMetricsServicesManager()->UpdateUploadPermissions( |
| 250 mayUpload); | 250 mayUpload); |
| 251 } | 251 } |
| OLD | NEW |