| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/options/content_settings_handler.h" | 5 #include "chrome/browser/dom_ui/options/content_settings_handler.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 notification_registrar_.Add( | 307 notification_registrar_.Add( |
| 308 this, NotificationType::OTR_PROFILE_CREATED, | 308 this, NotificationType::OTR_PROFILE_CREATED, |
| 309 NotificationService::AllSources()); | 309 NotificationService::AllSources()); |
| 310 notification_registrar_.Add( | 310 notification_registrar_.Add( |
| 311 this, NotificationType::PROFILE_DESTROYED, | 311 this, NotificationType::PROFILE_DESTROYED, |
| 312 NotificationService::AllSources()); | 312 NotificationService::AllSources()); |
| 313 | 313 |
| 314 UpdateAllExceptionsViewsFromModel(); | 314 UpdateAllExceptionsViewsFromModel(); |
| 315 notification_registrar_.Add( | 315 notification_registrar_.Add( |
| 316 this, NotificationType::CONTENT_SETTINGS_CHANGED, | 316 this, NotificationType::CONTENT_SETTINGS_CHANGED, |
| 317 Source<const HostContentSettingsMap>(settings_map)); | 317 NotificationService::AllSources()); |
| 318 notification_registrar_.Add( | 318 notification_registrar_.Add( |
| 319 this, NotificationType::DESKTOP_NOTIFICATION_DEFAULT_CHANGED, | 319 this, NotificationType::DESKTOP_NOTIFICATION_DEFAULT_CHANGED, |
| 320 NotificationService::AllSources()); | 320 NotificationService::AllSources()); |
| 321 notification_registrar_.Add( | 321 notification_registrar_.Add( |
| 322 this, NotificationType::DESKTOP_NOTIFICATION_SETTINGS_CHANGED, | 322 this, NotificationType::DESKTOP_NOTIFICATION_SETTINGS_CHANGED, |
| 323 NotificationService::AllSources()); | 323 NotificationService::AllSources()); |
| 324 | 324 |
| 325 PrefService* prefs = dom_ui_->GetProfile()->GetPrefs(); | 325 PrefService* prefs = dom_ui_->GetProfile()->GetPrefs(); |
| 326 pref_change_registrar_.Init(prefs); | 326 pref_change_registrar_.Init(prefs); |
| 327 pref_change_registrar_.Add(prefs::kGeolocationDefaultContentSetting, this); | 327 pref_change_registrar_.Add(prefs::kGeolocationDefaultContentSetting, this); |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 return dom_ui_->GetProfile()->GetHostContentSettingsMap(); | 762 return dom_ui_->GetProfile()->GetHostContentSettingsMap(); |
| 763 } | 763 } |
| 764 | 764 |
| 765 HostContentSettingsMap* | 765 HostContentSettingsMap* |
| 766 ContentSettingsHandler::GetOTRContentSettingsMap() { | 766 ContentSettingsHandler::GetOTRContentSettingsMap() { |
| 767 Profile* profile = dom_ui_->GetProfile(); | 767 Profile* profile = dom_ui_->GetProfile(); |
| 768 if (profile->HasOffTheRecordProfile()) | 768 if (profile->HasOffTheRecordProfile()) |
| 769 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); | 769 return profile->GetOffTheRecordProfile()->GetHostContentSettingsMap(); |
| 770 return NULL; | 770 return NULL; |
| 771 } | 771 } |
| OLD | NEW |