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

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

Issue 2817603003: Remove ListValue::Append(raw ptr) on Mac and iOS (Closed)
Patch Set: Comments Created 3 years, 8 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/block_popups_collection_view_controller. h" 5 #import "ios/chrome/browser/ui/settings/block_popups_collection_view_controller. h"
6 6
7 #import "base/ios/weak_nsobject.h" 7 #import "base/ios/weak_nsobject.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 entries[i].source != "preference") { 274 entries[i].source != "preference") {
275 continue; 275 continue;
276 } 276 }
277 // The content settings UI does not support secondary content settings 277 // The content settings UI does not support secondary content settings
278 // pattern yet. For content settings set through the content settings UI the 278 // pattern yet. For content settings set through the content settings UI the
279 // secondary pattern is by default a wildcard pattern. Hence users are not 279 // secondary pattern is by default a wildcard pattern. Hence users are not
280 // able to modify content settings with a secondary pattern other than the 280 // able to modify content settings with a secondary pattern other than the
281 // wildcard pattern. So only show settings that the user is able to modify. 281 // wildcard pattern. So only show settings that the user is able to modify.
282 if (entries[i].secondary_pattern == ContentSettingsPattern::Wildcard() && 282 if (entries[i].secondary_pattern == ContentSettingsPattern::Wildcard() &&
283 entries[i].setting == CONTENT_SETTING_ALLOW) { 283 entries[i].setting == CONTENT_SETTING_ALLOW) {
284 _exceptions.Append( 284 _exceptions.AppendString(entries[i].primary_pattern.ToString());
285 new base::Value(entries[i].primary_pattern.ToString()));
286 } else { 285 } else {
287 LOG(ERROR) << "Secondary content settings patterns are not " 286 LOG(ERROR) << "Secondary content settings patterns are not "
288 << "supported by the content settings UI"; 287 << "supported by the content settings UI";
289 } 288 }
290 } 289 }
291 } 290 }
292 291
293 - (void)populateExceptionsItems { 292 - (void)populateExceptionsItems {
294 CollectionViewModel* model = self.collectionViewModel; 293 CollectionViewModel* model = self.collectionViewModel;
295 [model addSectionWithIdentifier:SectionIdentifierExceptions]; 294 [model addSectionWithIdentifier:SectionIdentifierExceptions];
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 [[strongSelf collectionViewModel] 343 [[strongSelf collectionViewModel]
345 removeSectionWithIdentifier:SectionIdentifierExceptions]; 344 removeSectionWithIdentifier:SectionIdentifierExceptions];
346 [[strongSelf collectionView] 345 [[strongSelf collectionView]
347 deleteSections:[NSIndexSet indexSetWithIndex:index]]; 346 deleteSections:[NSIndexSet indexSetWithIndex:index]];
348 } 347 }
349 completion:nil]; 348 completion:nil];
350 } 349 }
351 } 350 }
352 351
353 @end 352 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698