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

Side by Side Diff: chrome/browser/push_messaging/push_messaging_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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_factory.h" 5 #include "chrome/browser/push_messaging/push_messaging_service_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "chrome/browser/budget_service/budget_manager_factory.h" 9 #include "chrome/browser/budget_service/budget_manager_factory.h"
10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" 10 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
11 #include "chrome/browser/gcm/gcm_profile_service_factory.h"
12 #include "chrome/browser/gcm/instance_id/instance_id_profile_service.h"
13 #include "chrome/browser/gcm/instance_id/instance_id_profile_service_factory.h"
11 #include "chrome/browser/permissions/permission_manager_factory.h" 14 #include "chrome/browser/permissions/permission_manager_factory.h"
12 #include "chrome/browser/profiles/incognito_helpers.h" 15 #include "chrome/browser/profiles/incognito_helpers.h"
13 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" 17 #include "chrome/browser/push_messaging/push_messaging_service_impl.h"
15 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
16 #include "chrome/browser/services/gcm/instance_id/instance_id_profile_service.h"
17 #include "chrome/browser/services/gcm/instance_id/instance_id_profile_service_fa ctory.h"
18 #include "components/keyed_service/content/browser_context_dependency_manager.h" 18 #include "components/keyed_service/content/browser_context_dependency_manager.h"
19 19
20 // static 20 // static
21 PushMessagingServiceImpl* PushMessagingServiceFactory::GetForProfile( 21 PushMessagingServiceImpl* PushMessagingServiceFactory::GetForProfile(
22 content::BrowserContext* context) { 22 content::BrowserContext* context) {
23 // The Push API is not currently supported in incognito mode. 23 // The Push API is not currently supported in incognito mode.
24 // See https://crbug.com/401439. 24 // See https://crbug.com/401439.
25 if (context->IsOffTheRecord()) 25 if (context->IsOffTheRecord())
26 return nullptr; 26 return nullptr;
27 27
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 content::BrowserContext* context) const { 66 content::BrowserContext* context) const {
67 Profile* profile = Profile::FromBrowserContext(context); 67 Profile* profile = Profile::FromBrowserContext(context);
68 CHECK(!profile->IsOffTheRecord()); 68 CHECK(!profile->IsOffTheRecord());
69 return new PushMessagingServiceImpl(profile); 69 return new PushMessagingServiceImpl(profile);
70 } 70 }
71 71
72 content::BrowserContext* PushMessagingServiceFactory::GetBrowserContextToUse( 72 content::BrowserContext* PushMessagingServiceFactory::GetBrowserContextToUse(
73 content::BrowserContext* context) const { 73 content::BrowserContext* context) const {
74 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 74 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
75 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698