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

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

Issue 7537025: Add new Content settings type AUTO-SUBMIT-CERTIFICATE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 GetProtocolHandlerRegistry()->enabled()); 392 GetProtocolHandlerRegistry()->enabled());
393 393
394 web_ui_->CallJavascriptFunction("ContentSettings.updateHandlersEnabledRadios", 394 web_ui_->CallJavascriptFunction("ContentSettings.updateHandlersEnabledRadios",
395 handlers_enabled); 395 handlers_enabled);
396 #endif // defined(ENABLE_REGISTER_PROTOCOL_HANDLER) 396 #endif // defined(ENABLE_REGISTER_PROTOCOL_HANDLER)
397 } 397 }
398 398
399 void ContentSettingsHandler::UpdateAllExceptionsViewsFromModel() { 399 void ContentSettingsHandler::UpdateAllExceptionsViewsFromModel() {
400 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1; 400 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1;
401 type < CONTENT_SETTINGS_NUM_TYPES; ++type) { 401 type < CONTENT_SETTINGS_NUM_TYPES; ++type) {
402 // The content settings type CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE
403 // is supposed to be set by policy only. Hence there is no user facing UI
404 // for this content type and we skip it here.
405 if (type == CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE)
406 continue;
402 UpdateExceptionsViewFromModel(static_cast<ContentSettingsType>(type)); 407 UpdateExceptionsViewFromModel(static_cast<ContentSettingsType>(type));
403 } 408 }
404 } 409 }
405 410
406 void ContentSettingsHandler::UpdateAllOTRExceptionsViewsFromModel() { 411 void ContentSettingsHandler::UpdateAllOTRExceptionsViewsFromModel() {
407 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1; 412 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1;
408 type < CONTENT_SETTINGS_NUM_TYPES; ++type) { 413 type < CONTENT_SETTINGS_NUM_TYPES; ++type) {
409 UpdateOTRExceptionsViewFromModel(static_cast<ContentSettingsType>(type)); 414 UpdateOTRExceptionsViewFromModel(static_cast<ContentSettingsType>(type));
410 } 415 }
411 } 416 }
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 return Profile::FromWebUI(web_ui_)->GetProtocolHandlerRegistry(); 731 return Profile::FromWebUI(web_ui_)->GetProtocolHandlerRegistry();
727 } 732 }
728 733
729 HostContentSettingsMap* 734 HostContentSettingsMap*
730 ContentSettingsHandler::GetOTRContentSettingsMap() { 735 ContentSettingsHandler::GetOTRContentSettingsMap() {
731 Profile* profile = Profile::FromWebUI(web_ui_); 736 Profile* profile = Profile::FromWebUI(web_ui_);
732 if (profile->HasOffTheRecordProfile()) 737 if (profile->HasOffTheRecordProfile())
733 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); 738 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap();
734 return NULL; 739 return NULL;
735 } 740 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698