Chromium Code Reviews| Index: chrome/browser/push_messaging/push_messaging_service_impl.h |
| diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.h b/chrome/browser/push_messaging/push_messaging_service_impl.h |
| index e6963d40008cf4115c82dfc08c162ba570ffabf7..a08d16fb0014883af60e100063d92ecc7b5d5eb6 100644 |
| --- a/chrome/browser/push_messaging/push_messaging_service_impl.h |
| +++ b/chrome/browser/push_messaging/push_messaging_service_impl.h |
| @@ -5,6 +5,7 @@ |
| #ifndef CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| #define CHROME_BROWSER_PUSH_MESSAGING_PUSH_MESSAGING_SERVICE_IMPL_H_ |
| +#include "base/callback.h" |
| #include "base/compiler_specific.h" |
| #include "base/memory/weak_ptr.h" |
| #include "components/content_settings/core/browser/content_settings_observer.h" |
| @@ -87,6 +88,9 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
| // KeyedService implementation. |
| void Shutdown() override; |
| + void SetContentSettingChangedCallbackForTesting( |
|
Bernhard Bauer
2015/03/12 17:46:51
You might want to add a comment here that explains
johnme
2015/03/13 11:56:13
Ok, removed the code that resets the callback :)
|
| + const base::Closure& callback); |
| + |
| private: |
| // A registration is pending until it has succeeded or failed. |
| void IncreasePushRegistrationCount(int add, bool is_pending); |
| @@ -147,6 +151,7 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
| // OnContentSettingChanged methods ------------------------------------------- |
| void UnregisterBecausePermissionRevoked(const PushMessagingApplicationId& id, |
| + const base::Closure& closure, |
| const std::string& sender_id, |
| bool success, bool not_found); |
| @@ -162,6 +167,8 @@ class PushMessagingServiceImpl : public content::PushMessagingService, |
| int push_registration_count_; |
| int pending_push_registration_count_; |
| + base::Closure content_setting_changed_callback_for_testing_; |
| + |
| base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); |