OLD | NEW |
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 kPrefsForManagedContentSettingsMap[i].content_type; | 269 kPrefsForManagedContentSettingsMap[i].content_type; |
270 DCHECK_NE(content_type, CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE); | 270 DCHECK_NE(content_type, CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE); |
271 // If only one pattern was defined auto expand it to a pattern pair. | 271 // If only one pattern was defined auto expand it to a pattern pair. |
272 ContentSettingsPattern secondary_pattern = | 272 ContentSettingsPattern secondary_pattern = |
273 !pattern_pair.second.IsValid() ? ContentSettingsPattern::Wildcard() | 273 !pattern_pair.second.IsValid() ? ContentSettingsPattern::Wildcard() |
274 : pattern_pair.second; | 274 : pattern_pair.second; |
275 value_map->SetValue( | 275 value_map->SetValue( |
276 pattern_pair.first, | 276 pattern_pair.first, |
277 secondary_pattern, | 277 secondary_pattern, |
278 content_type, | 278 content_type, |
279 ResourceIdentifier(NO_RESOURCE_IDENTIFIER), | 279 NO_RESOURCE_IDENTIFIER, |
280 base::Value::CreateIntegerValue( | 280 base::Value::CreateIntegerValue( |
281 kPrefsForManagedContentSettingsMap[i].setting)); | 281 kPrefsForManagedContentSettingsMap[i].setting)); |
282 } | 282 } |
283 } | 283 } |
284 } | 284 } |
285 | 285 |
286 void PolicyProvider::GetAutoSelectCertificateSettingsFromPreferences( | 286 void PolicyProvider::GetAutoSelectCertificateSettingsFromPreferences( |
287 OriginIdentifierValueMap* value_map) { | 287 OriginIdentifierValueMap* value_map) { |
288 const char* pref_name = prefs::kManagedAutoSelectCertificateForUrls; | 288 const char* pref_name = prefs::kManagedAutoSelectCertificateForUrls; |
289 | 289 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 ReadManagedDefaultSettings(); | 473 ReadManagedDefaultSettings(); |
474 } | 474 } |
475 | 475 |
476 NotifyObservers(ContentSettingsPattern(), | 476 NotifyObservers(ContentSettingsPattern(), |
477 ContentSettingsPattern(), | 477 ContentSettingsPattern(), |
478 CONTENT_SETTINGS_TYPE_DEFAULT, | 478 CONTENT_SETTINGS_TYPE_DEFAULT, |
479 std::string()); | 479 std::string()); |
480 } | 480 } |
481 | 481 |
482 } // namespace content_settings | 482 } // namespace content_settings |
OLD | NEW |