diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 23:17:07 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-19 23:17:07 +0000 |
commit | ad50def5e1165d0cc74b98f988bbd5962587d9f4 (patch) | |
tree | 3a751abaed2cc056ca60b8b1e3ff54532a6f4d3f /chrome/browser/content_settings | |
parent | 75c920505ddfb2d49c194c76bde64edd6b3f91f2 (diff) | |
download | chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.zip chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.gz chromium_src-ad50def5e1165d0cc74b98f988bbd5962587d9f4.tar.bz2 |
Make NotificationService an interface in the content namespace, and switch callers to use it. Move the implementation to content/browser. Stop creating it in all child processes since it's only used in the browser.
BUG=98716
Review URL: http://codereview.chromium.org/8342048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_settings')
6 files changed, 20 insertions, 20 deletions
diff --git a/chrome/browser/content_settings/content_settings_default_provider.cc b/chrome/browser/content_settings/content_settings_default_provider.cc index 0bc7eac..4964c9e 100644 --- a/chrome/browser/content_settings/content_settings_default_provider.cc +++ b/chrome/browser/content_settings/content_settings_default_provider.cc @@ -20,7 +20,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/browser_thread.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/content_settings/content_settings_policy_provider.cc b/chrome/browser/content_settings/content_settings_policy_provider.cc index d357ab3..342de2d 100644 --- a/chrome/browser/content_settings/content_settings_policy_provider.cc +++ b/chrome/browser/content_settings/content_settings_policy_provider.cc @@ -16,7 +16,7 @@ #include "chrome/common/content_settings_pattern.h" #include "chrome/common/pref_names.h" #include "content/browser/browser_thread.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" namespace { diff --git a/chrome/browser/content_settings/content_settings_pref_provider.cc b/chrome/browser/content_settings/content_settings_pref_provider.cc index 9c825e7..21ed316 100644 --- a/chrome/browser/content_settings/content_settings_pref_provider.cc +++ b/chrome/browser/content_settings/content_settings_pref_provider.cc @@ -23,7 +23,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/browser_thread.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/content_settings/host_content_settings_map.cc b/chrome/browser/content_settings/host_content_settings_map.cc index 99ace47..5d76b92 100644 --- a/chrome/browser/content_settings/host_content_settings_map.cc +++ b/chrome/browser/content_settings/host_content_settings_map.cc @@ -28,7 +28,7 @@ #include "chrome/common/url_constants.h" #include "content/browser/browser_thread.h" #include "content/browser/user_metrics.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "content/public/common/content_switches.h" #include "googleurl/src/gurl.h" @@ -480,7 +480,7 @@ void HostContentSettingsMap::OnContentSettingChanged( secondary_pattern, content_type, resource_identifier); - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, content::Source<HostContentSettingsMap>(this), content::Details<const ContentSettingsDetails>(&details)); diff --git a/chrome/browser/content_settings/mock_settings_observer.cc b/chrome/browser/content_settings/mock_settings_observer.cc index 7bcacfc..94cada60 100644 --- a/chrome/browser/content_settings/mock_settings_observer.cc +++ b/chrome/browser/content_settings/mock_settings_observer.cc @@ -7,13 +7,13 @@ #include "chrome/browser/content_settings/content_settings_details.h" #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/common/chrome_notification_types.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" #include "googleurl/src/gurl.h" MockSettingsObserver::MockSettingsObserver() { registrar_.Add(this, chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED, - NotificationService::AllSources()); + content::NotificationService::AllSources()); } MockSettingsObserver::~MockSettingsObserver() {} diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc index 42ac3cb..4e1a5c0 100644 --- a/chrome/browser/content_settings/tab_specific_content_settings.cc +++ b/chrome/browser/content_settings/tab_specific_content_settings.cc @@ -27,7 +27,7 @@ #include "content/browser/tab_contents/navigation_details.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/browser/tab_contents/tab_contents_delegate.h" -#include "content/common/notification_service.h" +#include "content/public/browser/notification_service.h" #include "content/common/view_messages.h" #include "webkit/fileapi/file_system_types.h" @@ -231,10 +231,10 @@ void TabSpecificContentSettings::OnContentBlocked( if (!content_blocked_[type]) { content_blocked_[type] = true; // TODO: it would be nice to have a way of mocking this in tests. - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, content::Source<TabContents>(tab_contents()), - NotificationService::NoDetails()); + content::NotificationService::NoDetails()); } } @@ -243,10 +243,10 @@ void TabSpecificContentSettings::OnContentAccessed(ContentSettingsType type) { << "Geolocation settings handled by OnGeolocationPermissionSet"; if (!content_accessed_[type]) { content_accessed_[type] = true; - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, content::Source<TabContents>(tab_contents()), - NotificationService::NoDetails()); + content::NotificationService::NoDetails()); } } @@ -349,10 +349,10 @@ void TabSpecificContentSettings::OnGeolocationPermissionSet( bool allowed) { geolocation_settings_state_.OnGeolocationPermissionSet(requesting_origin, allowed); - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, content::Source<TabContents>(tab_contents()), - NotificationService::NoDetails()); + content::NotificationService::NoDetails()); } void TabSpecificContentSettings::ClearBlockedContentSettingsExceptForCookies() { @@ -365,10 +365,10 @@ void TabSpecificContentSettings::ClearBlockedContentSettingsExceptForCookies() { content_blockage_indicated_to_user_[i] = false; } load_plugins_link_enabled_ = true; - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, content::Source<TabContents>(tab_contents()), - NotificationService::NoDetails()); + content::NotificationService::NoDetails()); } void TabSpecificContentSettings::ClearCookieSpecificContentSettings() { @@ -377,19 +377,19 @@ void TabSpecificContentSettings::ClearCookieSpecificContentSettings() { content_blocked_[CONTENT_SETTINGS_TYPE_COOKIES] = false; content_accessed_[CONTENT_SETTINGS_TYPE_COOKIES] = false; content_blockage_indicated_to_user_[CONTENT_SETTINGS_TYPE_COOKIES] = false; - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, content::Source<TabContents>(tab_contents()), - NotificationService::NoDetails()); + content::NotificationService::NoDetails()); } void TabSpecificContentSettings::SetPopupsBlocked(bool blocked) { content_blocked_[CONTENT_SETTINGS_TYPE_POPUPS] = blocked; content_blockage_indicated_to_user_[CONTENT_SETTINGS_TYPE_POPUPS] = false; - NotificationService::current()->Notify( + content::NotificationService::current()->Notify( chrome::NOTIFICATION_TAB_CONTENT_SETTINGS_CHANGED, content::Source<TabContents>(tab_contents()), - NotificationService::NoDetails()); + content::NotificationService::NoDetails()); } void TabSpecificContentSettings::GeolocationDidNavigate( |