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 #import "ios/chrome/browser/ui/settings/bandwidth_management_collection_view_con
troller.h" | 5 #import "ios/chrome/browser/ui/settings/bandwidth_management_collection_view_con
troller.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #include "components/prefs/pref_change_registrar.h" | 8 #include "components/prefs/pref_change_registrar.h" |
9 #include "components/prefs/pref_service.h" | 9 #include "components/prefs/pref_service.h" |
10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" | 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 - (void)onPreferenceChanged:(const std::string&)preferenceName { | 207 - (void)onPreferenceChanged:(const std::string&)preferenceName { |
208 if (preferenceName == prefs::kNetworkPredictionEnabled || | 208 if (preferenceName == prefs::kNetworkPredictionEnabled || |
209 preferenceName == prefs::kNetworkPredictionWifiOnly) { | 209 preferenceName == prefs::kNetworkPredictionWifiOnly) { |
210 NSString* detailText = [DataplanUsageCollectionViewController | 210 NSString* detailText = [DataplanUsageCollectionViewController |
211 currentLabelForPreference:_browserState->GetPrefs() | 211 currentLabelForPreference:_browserState->GetPrefs() |
212 basePref:prefs::kNetworkPredictionEnabled | 212 basePref:prefs::kNetworkPredictionEnabled |
213 wifiPref:prefs::kNetworkPredictionWifiOnly]; | 213 wifiPref:prefs::kNetworkPredictionWifiOnly]; |
214 | 214 |
215 _preloadWebpagesDetailItem.detailText = detailText; | 215 _preloadWebpagesDetailItem.detailText = detailText; |
216 | 216 |
217 [self reconfigureCellsForItems:@[ _preloadWebpagesDetailItem ] | 217 [self reconfigureCellsForItems:@[ _preloadWebpagesDetailItem ]]; |
218 inSectionWithIdentifier:SectionIdentifierActions]; | |
219 } | 218 } |
220 } | 219 } |
221 | 220 |
222 @end | 221 @end |
OLD | NEW |