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" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #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" | 22 #include "components/prefs/json_pref_store.h" |
23 #include "components/prefs/pref_service.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/browser_state/chrome_browser_state.h" | 30 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 31 #include "ios/chrome/browser/browser_state/chrome_browser_state_manager.h" |
31 #include "ios/chrome/browser/chrome_paths.h" | 32 #include "ios/chrome/browser/chrome_paths.h" |
32 #include "ios/chrome/browser/chrome_switches.h" | 33 #include "ios/chrome/browser/chrome_switches.h" |
33 #include "ios/chrome/browser/chrome_url_constants.h" | 34 #include "ios/chrome/browser/chrome_url_constants.h" |
34 #import "ios/chrome/browser/first_run/first_run.h" | 35 #import "ios/chrome/browser/first_run/first_run.h" |
35 #include "ios/chrome/browser/install_time_util.h" | 36 #include "ios/chrome/browser/install_time_util.h" |
36 #include "ios/chrome/browser/ios_chrome_field_trials.h" | 37 #include "ios/chrome/browser/ios_chrome_field_trials.h" |
37 #include "ios/chrome/browser/metrics/field_trial_synchronizer.h" | 38 #include "ios/chrome/browser/metrics/field_trial_synchronizer.h" |
38 #include "ios/chrome/browser/open_from_clipboard/create_clipboard_recent_content
.h" | 39 #include "ios/chrome/browser/open_from_clipboard/create_clipboard_recent_content
.h" |
39 #include "ios/chrome/browser/pref_names.h" | 40 #include "ios/chrome/browser/pref_names.h" |
40 #include "ios/chrome/browser/translate/translate_service_ios.h" | 41 #include "ios/chrome/browser/translate/translate_service_ios.h" |
41 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state_
manager.h" | |
42 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 42 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
43 #include "ios/web/public/web_thread.h" | 43 #include "ios/web/public/web_thread.h" |
44 #include "net/base/network_change_notifier.h" | 44 #include "net/base/network_change_notifier.h" |
45 #include "net/http/http_network_layer.h" | 45 #include "net/http/http_network_layer.h" |
46 #include "net/http/http_stream_factory.h" | 46 #include "net/http/http_stream_factory.h" |
47 #include "net/url_request/url_request.h" | 47 #include "net/url_request/url_request.h" |
48 #include "ui/base/l10n/l10n_util_mac.h" | 48 #include "ui/base/l10n/l10n_util_mac.h" |
49 #include "ui/base/resource/resource_bundle.h" | 49 #include "ui/base/resource/resource_bundle.h" |
50 | 50 |
51 #if defined(ENABLE_RLZ) | 51 #if defined(ENABLE_RLZ) |
(...skipping 190 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 |