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

Unified Diff: chrome/browser/services/gcm/instance_id/instance_id_profile_service_factory.cc

Issue 2657823005: Move //c/b/services/gcm/ to //c/b/gcm/ (Closed)
Patch Set: Created 3 years, 11 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/instance_id/instance_id_profile_service_factory.cc
diff --git a/chrome/browser/services/gcm/instance_id/instance_id_profile_service_factory.cc b/chrome/browser/services/gcm/instance_id/instance_id_profile_service_factory.cc
deleted file mode 100644
index 408c1e919fbeaff6a07d04948a02d7c4c3978400..0000000000000000000000000000000000000000
--- a/chrome/browser/services/gcm/instance_id/instance_id_profile_service_factory.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2015 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/instance_id/instance_id_profile_service_factory.h"
-
-#include <memory>
-
-#include "chrome/browser/profiles/incognito_helpers.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
-#include "chrome/browser/services/gcm/instance_id/instance_id_profile_service.h"
-#include "components/keyed_service/content/browser_context_dependency_manager.h"
-
-namespace instance_id {
-
-// static
-InstanceIDProfileService* InstanceIDProfileServiceFactory::GetForProfile(
- content::BrowserContext* profile) {
- // Instance ID is not supported in incognito mode.
- if (profile->IsOffTheRecord())
- return NULL;
-
- return static_cast<InstanceIDProfileService*>(
- GetInstance()->GetServiceForBrowserContext(profile, true));
-}
-
-// static
-InstanceIDProfileServiceFactory*
-InstanceIDProfileServiceFactory::GetInstance() {
- return base::Singleton<InstanceIDProfileServiceFactory>::get();
-}
-
-InstanceIDProfileServiceFactory::InstanceIDProfileServiceFactory()
- : BrowserContextKeyedServiceFactory(
- "InstanceIDProfileService",
- BrowserContextDependencyManager::GetInstance()) {
- // GCM is needed for device ID.
- DependsOn(gcm::GCMProfileServiceFactory::GetInstance());
-}
-
-InstanceIDProfileServiceFactory::~InstanceIDProfileServiceFactory() {
-}
-
-KeyedService* InstanceIDProfileServiceFactory::BuildServiceInstanceFor(
- content::BrowserContext* context) const {
- return new InstanceIDProfileService(Profile::FromBrowserContext(context));
-}
-
-content::BrowserContext*
-InstanceIDProfileServiceFactory::GetBrowserContextToUse(
- content::BrowserContext* context) const {
- return chrome::GetBrowserContextOwnInstanceInIncognito(context);
-}
-
-} // namespace instance_id

Powered by Google App Engine
This is Rietveld 408576698