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

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: Fixing keygen location in settings and wildcard. 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 ||
284 type == CONTENT_SETTINGS_TYPE_PLUGINS || 285 type == CONTENT_SETTINGS_TYPE_PLUGINS ||
285 type == CONTENT_SETTINGS_TYPE_POPUPS || 286 type == CONTENT_SETTINGS_TYPE_POPUPS ||
286 type == CONTENT_SETTINGS_TYPE_MOUSELOCK || 287 type == CONTENT_SETTINGS_TYPE_MOUSELOCK ||
287 type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS || 288 type == CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS ||
288 type == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) { 289 type == CONTENT_SETTINGS_TYPE_PUSH_MESSAGING) {
289 primary_pattern = ContentSettingsPattern::FromURL(site_url_); 290 primary_pattern = ContentSettingsPattern::FromURL(site_url_);
290 secondary_pattern = ContentSettingsPattern::Wildcard(); 291 secondary_pattern = ContentSettingsPattern::Wildcard();
291 } else if (type == CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC || 292 } else if (type == CONTENT_SETTINGS_TYPE_KEYGEN ||
293 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) {
294 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_); 296 primary_pattern = ContentSettingsPattern::FromURLNoWildcard(site_url_);
295 secondary_pattern = ContentSettingsPattern::Wildcard(); 297 secondary_pattern = ContentSettingsPattern::Wildcard();
296 } else { 298 } else {
297 NOTREACHED() << "ContentSettingsType " << type << "is not supported."; 299 NOTREACHED() << "ContentSettingsType " << type << "is not supported.";
298 } 300 }
299 301
300 // Permission settings are specified via rules. There exists always at least 302 // Permission settings are specified via rules. There exists always at least
301 // one rule for the default setting. Get the rule that currently defines 303 // one rule for the default setting. Get the rule that currently defines
(...skipping 436 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