Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(812)

Side by Side Diff: ios/chrome/browser/ui/settings/bandwidth_management_collection_view_controller.mm

Issue 2761263003: Allow CollectionViewModel/Controller queries without SectionIdentifier (Closed)
Patch Set: Cleanup Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698