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

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

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

Powered by Google App Engine
This is Rietveld 408576698