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

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: Fixed several bot compile errors Created 6 years, 4 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"}, 104 {CONTENT_SETTINGS_TYPE_FULLSCREEN, "fullscreen"},
105 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"}, 105 {CONTENT_SETTINGS_TYPE_MOUSELOCK, "mouselock"},
106 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"}, 106 {CONTENT_SETTINGS_TYPE_PROTOCOL_HANDLERS, "register-protocol-handler"},
107 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"}, 107 {CONTENT_SETTINGS_TYPE_MEDIASTREAM, "media-stream"},
108 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"}, 108 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC, "media-stream-mic"},
109 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"}, 109 {CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA, "media-stream-camera"},
110 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"}, 110 {CONTENT_SETTINGS_TYPE_PPAPI_BROKER, "ppapi-broker"},
111 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "multiple-automatic-downloads"}, 111 {CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, "multiple-automatic-downloads"},
112 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex"}, 112 {CONTENT_SETTINGS_TYPE_MIDI_SYSEX, "midi-sysex"},
113 {CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, "push-messaging"}, 113 {CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, "push-messaging"},
114 {CONTENT_SETTINGS_TYPE_SSL_CERT_DECISIONS, "ssl-cert-decisions"},
114 #if defined(OS_CHROMEOS) 115 #if defined(OS_CHROMEOS)
115 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"}, 116 {CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, "protectedContent"},
116 #endif 117 #endif
117 }; 118 };
118 119
119 // A pseudo content type. We use it to display data like a content setting even 120 // A pseudo content type. We use it to display data like a content setting even
120 // though it is not a real content setting. 121 // though it is not a real content setting.
121 const char* kZoomContentType = "zoomlevels"; 122 const char* kZoomContentType = "zoomlevels";
122 123
123 content::BrowserContext* GetBrowserContext(content::WebUI* web_ui) { 124 content::BrowserContext* GetBrowserContext(content::WebUI* web_ui) {
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() { 1568 void ContentSettingsHandler::UpdateProtectedContentExceptionsButton() {
1568 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui())); 1569 PrefService* prefs = user_prefs::UserPrefs::Get(GetBrowserContext(web_ui()));
1569 // Exceptions apply only when the feature is enabled. 1570 // Exceptions apply only when the feature is enabled.
1570 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM); 1571 bool enable_exceptions = prefs->GetBoolean(prefs::kEnableDRM);
1571 web_ui()->CallJavascriptFunction( 1572 web_ui()->CallJavascriptFunction(
1572 "ContentSettings.enableProtectedContentExceptions", 1573 "ContentSettings.enableProtectedContentExceptions",
1573 base::FundamentalValue(enable_exceptions)); 1574 base::FundamentalValue(enable_exceptions));
1574 } 1575 }
1575 1576
1576 } // namespace options 1577 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698