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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_service_impl.cc

Issue 2171503003: Remove remaining occurences of CONTENT_SETTINGS_TYPE_PUSH_MESSAGING (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-push-content-setting-2
Patch Set: Remove remaining occurences of CONTENT_SETTINGS_TYPE_PUSH_MESSAGING Created 4 years, 4 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 unified diff | Download patch
OLDNEW
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/base64url.h" 10 #include "base/base64url.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } 676 }
677 } 677 }
678 678
679 // OnContentSettingChanged methods --------------------------------------------- 679 // OnContentSettingChanged methods ---------------------------------------------
680 680
681 void PushMessagingServiceImpl::OnContentSettingChanged( 681 void PushMessagingServiceImpl::OnContentSettingChanged(
682 const ContentSettingsPattern& primary_pattern, 682 const ContentSettingsPattern& primary_pattern,
683 const ContentSettingsPattern& secondary_pattern, 683 const ContentSettingsPattern& secondary_pattern,
684 ContentSettingsType content_type, 684 ContentSettingsType content_type,
685 std::string resource_identifier) { 685 std::string resource_identifier) {
686 if (content_type != CONTENT_SETTINGS_TYPE_PUSH_MESSAGING && 686 if (content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS)
687 content_type != CONTENT_SETTINGS_TYPE_NOTIFICATIONS) {
688 return; 687 return;
689 }
690 688
691 std::vector<PushMessagingAppIdentifier> all_app_identifiers = 689 std::vector<PushMessagingAppIdentifier> all_app_identifiers =
692 PushMessagingAppIdentifier::GetAll(profile_); 690 PushMessagingAppIdentifier::GetAll(profile_);
693 691
694 base::Closure barrier_closure = base::BarrierClosure( 692 base::Closure barrier_closure = base::BarrierClosure(
695 all_app_identifiers.size(), 693 all_app_identifiers.size(),
696 content_setting_changed_callback_for_testing_.is_null() 694 content_setting_changed_callback_for_testing_.is_null()
697 ? base::Bind(&base::DoNothing) 695 ? base::Bind(&base::DoNothing)
698 : content_setting_changed_callback_for_testing_); 696 : content_setting_changed_callback_for_testing_);
699 697
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 blink::WebPushPermissionStatusGranted; 796 blink::WebPushPermissionStatusGranted;
799 } 797 }
800 798
801 gcm::GCMDriver* PushMessagingServiceImpl::GetGCMDriver() const { 799 gcm::GCMDriver* PushMessagingServiceImpl::GetGCMDriver() const {
802 gcm::GCMProfileService* gcm_profile_service = 800 gcm::GCMProfileService* gcm_profile_service =
803 gcm::GCMProfileServiceFactory::GetForProfile(profile_); 801 gcm::GCMProfileServiceFactory::GetForProfile(profile_);
804 CHECK(gcm_profile_service); 802 CHECK(gcm_profile_service);
805 CHECK(gcm_profile_service->driver()); 803 CHECK(gcm_profile_service->driver());
806 return gcm_profile_service->driver(); 804 return gcm_profile_service->driver();
807 } 805 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permission_util.cc ('k') | chrome/browser/push_messaging/push_messaging_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698