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

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

Issue 1459793002: Android: Allow compiling browser without Java UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/bind.h" 10 #include "base/bind.h"
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 } 712 }
713 713
714 // KeyedService methods ------------------------------------------------------- 714 // KeyedService methods -------------------------------------------------------
715 715
716 void PushMessagingServiceImpl::Shutdown() { 716 void PushMessagingServiceImpl::Shutdown() {
717 GetGCMDriver()->RemoveAppHandler(kPushMessagingAppIdentifierPrefix); 717 GetGCMDriver()->RemoveAppHandler(kPushMessagingAppIdentifierPrefix);
718 } 718 }
719 719
720 // BackgroundTrigger methods --------------------------------------------------- 720 // BackgroundTrigger methods ---------------------------------------------------
721 base::string16 PushMessagingServiceImpl::GetName() { 721 base::string16 PushMessagingServiceImpl::GetName() {
722 #if defined(ENABLE_NOTIFICATIONS)
722 return l10n_util::GetStringUTF16(IDS_NOTIFICATIONS_BACKGROUND_SERVICE_NAME); 723 return l10n_util::GetStringUTF16(IDS_NOTIFICATIONS_BACKGROUND_SERVICE_NAME);
724 #else
725 NOTREACHED();
726 return base::string16();
727 #endif
723 } 728 }
724 729
725 gfx::ImageSkia* PushMessagingServiceImpl::GetIcon() { 730 gfx::ImageSkia* PushMessagingServiceImpl::GetIcon() {
726 return nullptr; 731 return nullptr;
727 } 732 }
728 733
729 void PushMessagingServiceImpl::OnMenuClick() { 734 void PushMessagingServiceImpl::OnMenuClick() {
730 #if defined(ENABLE_BACKGROUND) 735 #if defined(ENABLE_BACKGROUND)
731 chrome::ShowContentSettings( 736 chrome::ShowContentSettings(
732 BackgroundModeManager::GetBrowserWindowForProfile(profile_), 737 BackgroundModeManager::GetBrowserWindowForProfile(profile_),
(...skipping 15 matching lines...) Expand all
748 switches::kEnablePushMessagePayload); 753 switches::kEnablePushMessagePayload);
749 } 754 }
750 755
751 gcm::GCMDriver* PushMessagingServiceImpl::GetGCMDriver() const { 756 gcm::GCMDriver* PushMessagingServiceImpl::GetGCMDriver() const {
752 gcm::GCMProfileService* gcm_profile_service = 757 gcm::GCMProfileService* gcm_profile_service =
753 gcm::GCMProfileServiceFactory::GetForProfile(profile_); 758 gcm::GCMProfileServiceFactory::GetForProfile(profile_);
754 CHECK(gcm_profile_service); 759 CHECK(gcm_profile_service);
755 CHECK(gcm_profile_service->driver()); 760 CHECK(gcm_profile_service->driver());
756 return gcm_profile_service->driver(); 761 return gcm_profile_service->driver();
757 } 762 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698