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

Side by Side Diff: chrome/browser/content_settings/content_settings_policy_provider.cc

Issue 440423003: Clean content_settings_pattern_parser.* from unnecessary dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm content_settings_initializer Created 6 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/content_settings/content_settings_policy_provider.h" 5 #include "chrome/browser/content_settings/content_settings_policy_provider.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 VLOG(1) << "Ignoring invalid certificate auto select setting. Reason:" 363 VLOG(1) << "Ignoring invalid certificate auto select setting. Reason:"
364 " Missing pattern or filter."; 364 " Missing pattern or filter.";
365 continue; 365 continue;
366 } 366 }
367 367
368 ContentSettingsPattern pattern = 368 ContentSettingsPattern pattern =
369 ContentSettingsPattern::FromString(pattern_str); 369 ContentSettingsPattern::FromString(pattern_str);
370 // Ignore invalid patterns. 370 // Ignore invalid patterns.
371 if (!pattern.IsValid()) { 371 if (!pattern.IsValid()) {
372 VLOG(1) << "Ignoring invalid certificate auto select setting:" 372 VLOG(1) << "Ignoring invalid certificate auto select setting:"
373 " Invalid content settings pattern: " << pattern; 373 " Invalid content settings pattern: " << pattern.ToString();
374 continue; 374 continue;
375 } 375 }
376 376
377 // Don't pass removed values from |value|, because base::Values read with 377 // Don't pass removed values from |value|, because base::Values read with
378 // JSONReader use a shared string buffer. Instead, DeepCopy here. 378 // JSONReader use a shared string buffer. Instead, DeepCopy here.
379 value_map->SetValue(pattern, 379 value_map->SetValue(pattern,
380 ContentSettingsPattern::Wildcard(), 380 ContentSettingsPattern::Wildcard(),
381 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, 381 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
382 std::string(), 382 std::string(),
383 cert_filter->DeepCopy()); 383 cert_filter->DeepCopy());
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 ReadManagedDefaultSettings(); 491 ReadManagedDefaultSettings();
492 } 492 }
493 493
494 NotifyObservers(ContentSettingsPattern(), 494 NotifyObservers(ContentSettingsPattern(),
495 ContentSettingsPattern(), 495 ContentSettingsPattern(),
496 CONTENT_SETTINGS_TYPE_DEFAULT, 496 CONTENT_SETTINGS_TYPE_DEFAULT,
497 std::string()); 497 std::string());
498 } 498 }
499 499
500 } // namespace content_settings 500 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698