OLD | NEW |
---|---|
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
386 FundamentalValue handlers_enabled(GetProtocolHandlerRegistry()->enabled()); | 386 FundamentalValue handlers_enabled(GetProtocolHandlerRegistry()->enabled()); |
387 | 387 |
388 web_ui_->CallJavascriptFunction("ContentSettings.updateHandlersEnabledRadios", | 388 web_ui_->CallJavascriptFunction("ContentSettings.updateHandlersEnabledRadios", |
389 handlers_enabled); | 389 handlers_enabled); |
390 #endif // defined(ENABLE_REGISTER_PROTOCOL_HANDLER) | 390 #endif // defined(ENABLE_REGISTER_PROTOCOL_HANDLER) |
391 } | 391 } |
392 | 392 |
393 void ContentSettingsHandler::UpdateAllExceptionsViewsFromModel() { | 393 void ContentSettingsHandler::UpdateAllExceptionsViewsFromModel() { |
394 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1; | 394 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1; |
395 type < CONTENT_SETTINGS_NUM_TYPES; ++type) { | 395 type < CONTENT_SETTINGS_NUM_TYPES; ++type) { |
396 if (type == CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE) | |
397 continue; | |
wtc
2011/08/11 18:33:55
Why CONTENT_SETTINGS_TYPE_AUTO_SUBMIT_CERTIFICATE
markusheintz_
2011/08/15 19:09:04
Done.
| |
396 UpdateExceptionsViewFromModel(static_cast<ContentSettingsType>(type)); | 398 UpdateExceptionsViewFromModel(static_cast<ContentSettingsType>(type)); |
397 } | 399 } |
398 } | 400 } |
399 | 401 |
400 void ContentSettingsHandler::UpdateAllOTRExceptionsViewsFromModel() { | 402 void ContentSettingsHandler::UpdateAllOTRExceptionsViewsFromModel() { |
401 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1; | 403 for (int type = CONTENT_SETTINGS_TYPE_DEFAULT + 1; |
402 type < CONTENT_SETTINGS_NUM_TYPES; ++type) { | 404 type < CONTENT_SETTINGS_NUM_TYPES; ++type) { |
403 UpdateOTRExceptionsViewFromModel(static_cast<ContentSettingsType>(type)); | 405 UpdateOTRExceptionsViewFromModel(static_cast<ContentSettingsType>(type)); |
404 } | 406 } |
405 } | 407 } |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
717 return web_ui_->GetProfile()->GetProtocolHandlerRegistry(); | 719 return web_ui_->GetProfile()->GetProtocolHandlerRegistry(); |
718 } | 720 } |
719 | 721 |
720 HostContentSettingsMap* | 722 HostContentSettingsMap* |
721 ContentSettingsHandler::GetOTRContentSettingsMap() { | 723 ContentSettingsHandler::GetOTRContentSettingsMap() { |
722 Profile* profile = web_ui_->GetProfile(); | 724 Profile* profile = web_ui_->GetProfile(); |
723 if (profile->HasOffTheRecordProfile()) | 725 if (profile->HasOffTheRecordProfile()) |
724 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); | 726 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); |
725 return NULL; | 727 return NULL; |
726 } | 728 } |
OLD | NEW |