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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 1412523003: Adding <keygen> Content Setting (UI) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on core CL. Created 5 years, 1 month 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 "chrome/browser/ui/website_settings/website_settings.h" 5 #include "chrome/browser/ui/website_settings/website_settings.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 CONTENT_SETTINGS_TYPE_JAVASCRIPT, 88 CONTENT_SETTINGS_TYPE_JAVASCRIPT,
89 CONTENT_SETTINGS_TYPE_POPUPS, 89 CONTENT_SETTINGS_TYPE_POPUPS,
90 CONTENT_SETTINGS_TYPE_FULLSCREEN, 90 CONTENT_SETTINGS_TYPE_FULLSCREEN,
91 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, 91 CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS,
92 CONTENT_SETTINGS_TYPE_PLUGINS, 92 CONTENT_SETTINGS_TYPE_PLUGINS,
93 CONTENT_SETTINGS_TYPE_MOUSELOCK, 93 CONTENT_SETTINGS_TYPE_MOUSELOCK,
94 CONTENT_SETTINGS_TYPE_MIDI_SYSEX, 94 CONTENT_SETTINGS_TYPE_MIDI_SYSEX,
95 #if defined(OS_ANDROID) 95 #if defined(OS_ANDROID)
96 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, 96 CONTENT_SETTINGS_TYPE_PUSH_MESSAGING,
97 #endif 97 #endif
98 CONTENT_SETTINGS_TYPE_KEYGEN,
98 }; 99 };
99 100
100 // Returns true if any of the given statuses match |status|. 101 // Returns true if any of the given statuses match |status|.
101 bool CertificateTransparencyStatusMatchAny( 102 bool CertificateTransparencyStatusMatchAny(
102 const std::vector<net::ct::SCTVerifyStatus>& sct_verify_statuses, 103 const std::vector<net::ct::SCTVerifyStatus>& sct_verify_statuses,
103 net::ct::SCTVerifyStatus status) { 104 net::ct::SCTVerifyStatus status) {
104 for (const auto& verify_status : sct_verify_statuses) { 105 for (const auto& verify_status : sct_verify_statuses) {
105 if (verify_status == status) 106 if (verify_status == status)
106 return true; 107 return true;
107 } 108 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 ContentSettingsPattern secondary_pattern; 275 ContentSettingsPattern secondary_pattern;
275 if (type == CONTENT_SETTINGS_TYPE_GEOLOCATION || 276 if (type == CONTENT_SETTINGS_TYPE_GEOLOCATION ||
276 type == CONTENT_SETTINGS_TYPE_MIDI_SYSEX || 277 type == CONTENT_SETTINGS_TYPE_MIDI_SYSEX ||
277 type == CONTENT_SETTINGS_TYPE_FULLSCREEN) { 278 type == CONTENT_SETTINGS_TYPE_FULLSCREEN) {
278 // TODO(markusheintz): The rule we create here should also change the 279 // TODO(markusheintz): The rule we create here should also change the
279 // location permission for iframed content. 280 // location permission for iframed content.
280 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_); 281 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_);
281 secondary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_); 282 secondary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_);
282 } else if (type == CONTENT_SETTINGS_TYPE_IMAGES || 283 } else if (type == CONTENT_SETTINGS_TYPE_IMAGES ||
283 type == CONTENT_SETTINGS_TYPE_JAVASCRIPT || 284 type == CONTENT_SETTINGS_TYPE_JAVASCRIPT ||
285 type == CONTENT_SETTINGS_TYPE_KEYGEN ||
msramek 2015/11/05 16:22:31 This sounds like a security feature to me, so I wo
svaldez 2015/11/05 16:35:12 Done.
284 type == CONTENT_SETTINGS_TYPE_PLUGINS || 286 type == CONTENT_SETTINGS_TYPE_PLUGINS ||
285 type == CONTENT_SETTINGS_TYPE_POPUPS || 287 type == CONTENT_SETTINGS_TYPE_POPUPS ||
286 type == CONTENT_SETTINGS_TYPE_MOUSELOCK || 288 type == CONTENT_SETTINGS_TYPE_MOUSELOCK ||
287 type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS || 289 type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS ||
288 type == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) { 290 type == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) {
289 primary_pattern = ContentSettingsPattern::FromURL(site_url_); 291 primary_pattern = ContentSettingsPattern::FromURL(site_url_);
290 secondary_pattern = ContentSettingsPattern::Wildcard(); 292 secondary_pattern = ContentSettingsPattern::Wildcard();
291 } else if (type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || 293 } else if (type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC ||
292 type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA || 294 type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA ||
293 type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { 295 type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) {
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 info.connection_status = site_connection_status_; 740 info.connection_status = site_connection_status_;
739 info.connection_status_description = 741 info.connection_status_description =
740 UTF16ToUTF8(site_connection_details_); 742 UTF16ToUTF8(site_connection_details_);
741 info.identity_status = site_identity_status_; 743 info.identity_status = site_identity_status_;
742 info.identity_status_description = 744 info.identity_status_description =
743 UTF16ToUTF8(site_identity_details_); 745 UTF16ToUTF8(site_identity_details_);
744 info.cert_id = cert_id_; 746 info.cert_id = cert_id_;
745 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_; 747 info.show_ssl_decision_revoke_button = show_ssl_decision_revoke_button_;
746 ui_->SetIdentityInfo(info); 748 ui_->SetIdentityInfo(info);
747 } 749 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698