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

Side by Side Diff: components/content_settings/core/browser/host_content_settings_map.cc

Issue 1412523003: Adding <keygen> Content Setting (UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using new Keygen icons. Created 4 years, 11 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 (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 "components/content_settings/core/browser/host_content_settings_map.h" 5 #include "components/content_settings/core/browser/host_content_settings_map.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } else if (type == CONTENT_SETTINGS_TYPE_COOKIES || 338 } else if (type == CONTENT_SETTINGS_TYPE_COOKIES ||
339 type == CONTENT_SETTINGS_TYPE_IMAGES || 339 type == CONTENT_SETTINGS_TYPE_IMAGES ||
340 type == CONTENT_SETTINGS_TYPE_JAVASCRIPT || 340 type == CONTENT_SETTINGS_TYPE_JAVASCRIPT ||
341 type == CONTENT_SETTINGS_TYPE_PLUGINS || 341 type == CONTENT_SETTINGS_TYPE_PLUGINS ||
342 type == CONTENT_SETTINGS_TYPE_POPUPS || 342 type == CONTENT_SETTINGS_TYPE_POPUPS ||
343 type == CONTENT_SETTINGS_TYPE_MOUSELOCK || 343 type == CONTENT_SETTINGS_TYPE_MOUSELOCK ||
344 type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS || 344 type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS ||
345 type == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) { 345 type == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) {
346 primary_pattern = ContentSettingsPattern::FromURL(primary_url); 346 primary_pattern = ContentSettingsPattern::FromURL(primary_url);
347 secondary_pattern = ContentSettingsPattern::Wildcard(); 347 secondary_pattern = ContentSettingsPattern::Wildcard();
348 } else if (type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || 348 } else if (type == CONTENT_SETTINGS_TYPE_KEYGEN ||
349 type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC ||
349 type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || 350 type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA ||
350 type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS || 351 type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS ||
351 type == CONTENT_SETTINGS_TYPE_PPAPI_BROKER) { 352 type == CONTENT_SETTINGS_TYPE_PPAPI_BROKER) {
352 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(primary_url); 353 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(primary_url);
353 secondary_pattern = ContentSettingsPattern::Wildcard(); 354 secondary_pattern = ContentSettingsPattern::Wildcard();
354 } else { 355 } else {
355 NOTREACHED() << "ContentSettingsType " << type << "is not supported."; 356 NOTREACHED() << "ContentSettingsType " << type << "is not supported.";
356 } 357 }
357 358
358 // Permission settings are specified via rules. There exists always at least 359 // Permission settings are specified via rules. There exists always at least
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 rule.secondary_pattern.Matches(secondary_url)) { 745 rule.secondary_pattern.Matches(secondary_url)) {
745 if (primary_pattern) 746 if (primary_pattern)
746 *primary_pattern = rule.primary_pattern; 747 *primary_pattern = rule.primary_pattern;
747 if (secondary_pattern) 748 if (secondary_pattern)
748 *secondary_pattern = rule.secondary_pattern; 749 *secondary_pattern = rule.secondary_pattern;
749 return make_scoped_ptr(rule.value.get()->DeepCopy()); 750 return make_scoped_ptr(rule.value.get()->DeepCopy());
750 } 751 }
751 } 752 }
752 return scoped_ptr<base::Value>(); 753 return scoped_ptr<base::Value>();
753 } 754 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/content_settings_handler.cc ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698