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

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_api.cc

Issue 147923005: Split ExtensionSystem interface from ExtensionSystemImpl implementation, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re^3base Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extensions/api/push_messaging/push_messaging_api.h" 5 #include "chrome/browser/extensions/api/push_messaging/push_messaging_api.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/chrome_notification_types.h" 14 #include "chrome/browser/chrome_notification_types.h"
15 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_handler.h" 15 #include "chrome/browser/extensions/api/push_messaging/push_messaging_invalidati on_handler.h"
16 #include "chrome/browser/extensions/extension_service.h" 16 #include "chrome/browser/extensions/extension_service.h"
17 #include "chrome/browser/extensions/extension_system.h"
18 #include "chrome/browser/extensions/extension_system_factory.h" 17 #include "chrome/browser/extensions/extension_system_factory.h"
19 #include "chrome/browser/extensions/token_cache/token_cache_service.h" 18 #include "chrome/browser/extensions/token_cache/token_cache_service.h"
20 #include "chrome/browser/extensions/token_cache/token_cache_service_factory.h" 19 #include "chrome/browser/extensions/token_cache/token_cache_service_factory.h"
21 #include "chrome/browser/invalidation/invalidation_service.h" 20 #include "chrome/browser/invalidation/invalidation_service.h"
22 #include "chrome/browser/invalidation/invalidation_service_factory.h" 21 #include "chrome/browser/invalidation/invalidation_service_factory.h"
23 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/signin/profile_oauth2_token_service.h" 23 #include "chrome/browser/signin/profile_oauth2_token_service.h"
25 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 24 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
26 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 25 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
27 #include "chrome/common/extensions/api/push_messaging.h" 26 #include "chrome/common/extensions/api/push_messaging.h"
28 #include "content/public/browser/browser_thread.h" 27 #include "content/public/browser/browser_thread.h"
29 #include "content/public/browser/notification_details.h" 28 #include "content/public/browser/notification_details.h"
30 #include "content/public/browser/notification_source.h" 29 #include "content/public/browser/notification_source.h"
31 #include "extensions/browser/event_router.h" 30 #include "extensions/browser/event_router.h"
31 #include "extensions/browser/extension_system.h"
32 #include "extensions/common/extension.h" 32 #include "extensions/common/extension.h"
33 #include "extensions/common/permissions/api_permission.h" 33 #include "extensions/common/permissions/api_permission.h"
34 #include "google_apis/gaia/gaia_constants.h" 34 #include "google_apis/gaia/gaia_constants.h"
35 35
36 using content::BrowserThread; 36 using content::BrowserThread;
37 37
38 const char kChannelIdSeparator[] = "/"; 38 const char kChannelIdSeparator[] = "/";
39 const char kUserNotSignedIn[] = "The user is not signed in."; 39 const char kUserNotSignedIn[] = "The user is not signed in.";
40 const char kUserAccessTokenFailure[] = 40 const char kUserAccessTokenFailure[] =
41 "Cannot obtain access token for the user."; 41 "Cannot obtain access token for the user.";
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 handler_ = mapper.Pass(); 355 handler_ = mapper.Pass();
356 } 356 }
357 357
358 template <> 358 template <>
359 void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies() { 359 void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies() {
360 DependsOn(ExtensionSystemFactory::GetInstance()); 360 DependsOn(ExtensionSystemFactory::GetInstance());
361 DependsOn(invalidation::InvalidationServiceFactory::GetInstance()); 361 DependsOn(invalidation::InvalidationServiceFactory::GetInstance());
362 } 362 }
363 363
364 } // namespace extensions 364 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/processes/processes_api.cc ('k') | chrome/browser/extensions/api/runtime/runtime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698