Chromium Code Reviews| 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 <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 break; | 440 break; |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 | 443 |
| 444 void ContentSettingsHandler::UpdateOTRExceptionsViewFromModel( | 444 void ContentSettingsHandler::UpdateOTRExceptionsViewFromModel( |
| 445 ContentSettingsType type) { | 445 ContentSettingsType type) { |
| 446 switch (type) { | 446 switch (type) { |
| 447 case CONTENT_SETTINGS_TYPE_GEOLOCATION: | 447 case CONTENT_SETTINGS_TYPE_GEOLOCATION: |
| 448 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: | 448 case CONTENT_SETTINGS_TYPE_NOTIFICATIONS: |
| 449 case CONTENT_SETTINGS_TYPE_INTENTS: | 449 case CONTENT_SETTINGS_TYPE_INTENTS: |
| 450 case CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE: | |
|
Bernhard Bauer
2011/09/21 12:52:34
Nit: if we plan on extending content settings to m
| |
| 450 break; | 451 break; |
| 451 default: | 452 default: |
| 452 UpdateExceptionsViewFromOTRHostContentSettingsMap(type); | 453 UpdateExceptionsViewFromOTRHostContentSettingsMap(type); |
| 453 break; | 454 break; |
| 454 } | 455 } |
| 455 } | 456 } |
| 456 | 457 |
| 457 void ContentSettingsHandler::UpdateGeolocationExceptionsView() { | 458 void ContentSettingsHandler::UpdateGeolocationExceptionsView() { |
| 458 Profile* profile = Profile::FromWebUI(web_ui_); | 459 Profile* profile = Profile::FromWebUI(web_ui_); |
| 459 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); | 460 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 767 return Profile::FromWebUI(web_ui_)->GetProtocolHandlerRegistry(); | 768 return Profile::FromWebUI(web_ui_)->GetProtocolHandlerRegistry(); |
| 768 } | 769 } |
| 769 | 770 |
| 770 HostContentSettingsMap* | 771 HostContentSettingsMap* |
| 771 ContentSettingsHandler::GetOTRContentSettingsMap() { | 772 ContentSettingsHandler::GetOTRContentSettingsMap() { |
| 772 Profile* profile = Profile::FromWebUI(web_ui_); | 773 Profile* profile = Profile::FromWebUI(web_ui_); |
| 773 if (profile->HasOffTheRecordProfile()) | 774 if (profile->HasOffTheRecordProfile()) |
| 774 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); | 775 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); |
| 775 return NULL; | 776 return NULL; |
| 776 } | 777 } |
| OLD | NEW |