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

Unified Diff: chrome/browser/services/gcm/push_messaging_permission_context_factory.cc

Issue 955673004: Move gcm-independent parts of push messaging out of gcm namespace and directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove redundant cast 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_permission_context_factory.cc
diff --git a/chrome/browser/services/gcm/push_messaging_permission_context_factory.cc b/chrome/browser/services/gcm/push_messaging_permission_context_factory.cc
deleted file mode 100644
index d60297f41bed179771ed515398bb2c7f8948c74b..0000000000000000000000000000000000000000
--- a/chrome/browser/services/gcm/push_messaging_permission_context_factory.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/services/gcm/push_messaging_permission_context_factory.h"
-
-#include "chrome/browser/profiles/incognito_helpers.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/services/gcm/push_messaging_permission_context.h"
-#include "components/keyed_service/content/browser_context_dependency_manager.h"
-
-namespace gcm {
-
-// static
-PushMessagingPermissionContext*
-PushMessagingPermissionContextFactory::GetForProfile(
- Profile* profile) {
- return static_cast<PushMessagingPermissionContext*>(
- GetInstance()->GetServiceForBrowserContext(profile, true));
-}
-
-// static
-PushMessagingPermissionContextFactory*
-PushMessagingPermissionContextFactory::GetInstance() {
- return Singleton<PushMessagingPermissionContextFactory>::get();
-}
-
-PushMessagingPermissionContextFactory::PushMessagingPermissionContextFactory()
- : BrowserContextKeyedServiceFactory(
- "GCMPermissionContext",
- BrowserContextDependencyManager::GetInstance()) {
-}
-
-PushMessagingPermissionContextFactory
-::~PushMessagingPermissionContextFactory() {
-}
-
-KeyedService* PushMessagingPermissionContextFactory::BuildServiceInstanceFor(
- content::BrowserContext* profile) const {
- return new PushMessagingPermissionContext(static_cast<Profile*>(profile));
-}
-
-content::BrowserContext*
-PushMessagingPermissionContextFactory::GetBrowserContextToUse(
- content::BrowserContext* context) const {
- return chrome::GetBrowserContextOwnInstanceInIncognito(context);
-}
-
-} // namespace gcm

Powered by Google App Engine
This is Rietveld 408576698