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

Side by Side Diff: chrome/browser/ui/webui/options/content_settings_handler.cc

Issue 369703002: Remember user decisions on invalid certificates behind a flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes from felt plus new incognito browser tests Created 6 years, 5 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/ui/webui/options/content_settings_handler.h" 5 #include "chrome/browser/ui/webui/options/content_settings_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"}, 101 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"},
102 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"}, 102 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"},
103 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"}, 103 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"},
104 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"}, 104 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"},
105 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"}, 105 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"},
106 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"}, 106 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"},
107 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"}, 107 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"},
108 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "multiple-automatic-downloads"}, 108 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "multiple-automatic-downloads"},
109 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex"}, 109 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex"},
110 {CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, "push-messaging"}, 110 {CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, "push-messaging"},
111 {CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS, "ssl-cert-decisions"},
111 #if defined(OS_CHROMEOS) 112 #if defined(OS_CHROMEOS)
112 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"}, 113 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"},
113 #endif 114 #endif
114 }; 115 };
115 116
116 // A pseudo content type. We use it to display data like a content setting even 117 // A pseudo content type. We use it to display data like a content setting even
117 // though it is not a real content setting. 118 // though it is not a real content setting.
118 const char* kZoomContentType = "zoomlevels"; 119 const char* kZoomContentType = "zoomlevels";
119 120
120 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) { 121 ContentSettingsType ContentSettingsTypeFromGroupName(const std::string& name) {
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { 1567 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() {
1567 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs(); 1568 PrefService* prefs = Profile::FromWebUI(web_ui())->GetPrefs();
1568 // Exceptions apply only when the feature is enabled. 1569 // Exceptions apply only when the feature is enabled.
1569 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1570 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1570 web_ui()->CallJavascriptFunction( 1571 web_ui()->CallJavascriptFunction(
1571 "ContentSettings.enableProtectedContentExceptions", 1572 "ContentSettings.enableProtectedContentExceptions",
1572 base::FundamentalValue(enable_exceptions)); 1573 base::FundamentalValue(enable_exceptions));
1573 } 1574 }
1574 1575
1575 } // namespace options 1576 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698