| Index: chrome/browser/content_exceptions_table_model.cc
|
| diff --git a/chrome/browser/content_exceptions_table_model.cc b/chrome/browser/content_exceptions_table_model.cc
|
| index 4d4eda97b874d3a39b187a19a1f7f1e2d1b6be8c..6103e72cc4bad18f5fb50721a45d2743c60de6d6 100644
|
| --- a/chrome/browser/content_exceptions_table_model.cc
|
| +++ b/chrome/browser/content_exceptions_table_model.cc
|
| @@ -16,6 +16,9 @@ ContentExceptionsTableModel::ContentExceptionsTableModel(
|
| : map_(map),
|
| content_type_(type),
|
| observer_(NULL) {
|
| + registrar_.Add(this, NotificationType::CONTENT_SETTINGS_CHANGED,
|
| + NotificationService::AllSources());
|
| +
|
| // Load the contents.
|
| map->GetSettingsForOneType(type, &entries_);
|
| }
|
| @@ -89,3 +92,18 @@ std::wstring ContentExceptionsTableModel::GetText(int row, int column_id) {
|
| void ContentExceptionsTableModel::SetObserver(TableModelObserver* observer) {
|
| observer_ = observer;
|
| }
|
| +
|
| +void ContentExceptionsTableModel::Observe(
|
| + NotificationType type,
|
| + const NotificationSource& source,
|
| + const NotificationDetails& details) {
|
| + // XXX: check the notification is for the right type
|
| +fprintf(stderr, "observing\n");
|
| + // Reload the contents.
|
| + map_->GetSettingsForOneType(content_type_, &entries_);
|
| +
|
| + if (observer_) {
|
| +fprintf(stderr, "notifying\n");
|
| + observer_->OnModelChanged();
|
| + }
|
| +}
|
|
|