OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/push_messaging/push_messaging_service_impl.h" | 5 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/barrier_closure.h" | 9 #include "base/barrier_closure.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
645 break; | 645 break; |
646 } | 646 } |
647 } | 647 } |
648 | 648 |
649 // OnContentSettingChanged methods --------------------------------------------- | 649 // OnContentSettingChanged methods --------------------------------------------- |
650 | 650 |
651 void PushMessagingServiceImpl::OnContentSettingChanged( | 651 void PushMessagingServiceImpl::OnContentSettingChanged( |
652 const ContentSettingsPattern& primary_pattern, | 652 const ContentSettingsPattern& primary_pattern, |
653 const ContentSettingsPattern& secondary_pattern, | 653 const ContentSettingsPattern& secondary_pattern, |
654 ContentSettingsType content_type, | 654 ContentSettingsType content_type, |
| 655 ContentSetting previous_value, |
655 std::string resource_identifier) { | 656 std::string resource_identifier) { |
656 if (content_type != CONTENT_SETTINGS_TYPE_PUSH_MESSAGING && | 657 if (content_type != CONTENT_SETTINGS_TYPE_PUSH_MESSAGING && |
657 content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { | 658 content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { |
658 return; | 659 return; |
659 } | 660 } |
660 | 661 |
661 std::vector<PushMessagingAppIdentifier> all_app_identifiers = | 662 std::vector<PushMessagingAppIdentifier> all_app_identifiers = |
662 PushMessagingAppIdentifier::GetAll(profile_); | 663 PushMessagingAppIdentifier::GetAll(profile_); |
663 | 664 |
664 base::Closure barrier_closure = base::BarrierClosure( | 665 base::Closure barrier_closure = base::BarrierClosure( |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 blink::WebPushPermissionStatusGranted; | 755 blink::WebPushPermissionStatusGranted; |
755 } | 756 } |
756 | 757 |
757 gcm::GCMDriver* PushMessagingServiceImpl::GetGCMDriver() const { | 758 gcm::GCMDriver* PushMessagingServiceImpl::GetGCMDriver() const { |
758 gcm::GCMProfileService* gcm_profile_service = | 759 gcm::GCMProfileService* gcm_profile_service = |
759 gcm::GCMProfileServiceFactory::GetForProfile(profile_); | 760 gcm::GCMProfileServiceFactory::GetForProfile(profile_); |
760 CHECK(gcm_profile_service); | 761 CHECK(gcm_profile_service); |
761 CHECK(gcm_profile_service->driver()); | 762 CHECK(gcm_profile_service->driver()); |
762 return gcm_profile_service->driver(); | 763 return gcm_profile_service->driver(); |
763 } | 764 } |
OLD | NEW |