Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6074)

Unified Diff: chrome/browser/services/gcm/push_messaging_service_impl.h

Issue 930083002: Unregister with push service and SW database when permission is lost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add copy ctor Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/services/gcm/push_messaging_service_impl.h
diff --git a/chrome/browser/services/gcm/push_messaging_service_impl.h b/chrome/browser/services/gcm/push_messaging_service_impl.h
index 29c03b899b7421923248f83cf776b76af8278f50..edc4548424815c0888ba14c7a8b03e2002e9806c 100644
--- a/chrome/browser/services/gcm/push_messaging_service_impl.h
+++ b/chrome/browser/services/gcm/push_messaging_service_impl.h
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
+#include "components/content_settings/core/browser/content_settings_observer.h"
#include "components/gcm_driver/gcm_app_handler.h"
#include "components/gcm_driver/gcm_client.h"
#include "content/public/browser/push_messaging_service.h"
@@ -25,7 +26,8 @@ class GCMProfileService;
class PushMessagingApplicationId;
class PushMessagingServiceImpl : public content::PushMessagingService,
- public GCMAppHandler {
+ public GCMAppHandler,
+ public content_settings::Observer {
public:
// Register profile-specific prefs for GCM.
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -73,6 +75,12 @@ class PushMessagingServiceImpl : public content::PushMessagingService,
const GURL& requesting_origin,
const GURL& embedding_origin) override;
+ // content_settings::Observer implementation.
+ void OnContentSettingChanged(const ContentSettingsPattern& primary_pattern,
+ const ContentSettingsPattern& secondary_pattern,
+ ContentSettingsType content_type,
+ std::string resource_identifier) override;
+
void SetProfileForTesting(Profile* profile);
private:

Powered by Google App Engine
This is Rietveld 408576698