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

Side by Side Diff: chrome/browser/extensions/api/copresence/copresence_api.cc

Issue 1425783002: Componentizing GcmProfileService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UT errors as per comments Created 5 years, 1 month 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/extensions/api/copresence/copresence_api.h" 5 #include "chrome/browser/extensions/api/copresence/copresence_api.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "base/memory/linked_ptr.h" 8 #include "base/memory/linked_ptr.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/copresence/chrome_whispernet_client.h" 10 #include "chrome/browser/copresence/chrome_whispernet_client.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/services/gcm/gcm_profile_service.h"
13 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 12 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
14 #include "chrome/common/channel_info.h" 13 #include "chrome/common/channel_info.h"
15 #include "chrome/common/extensions/api/copresence.h" 14 #include "chrome/common/extensions/api/copresence.h"
16 #include "chrome/common/extensions/manifest_handlers/copresence_manifest.h" 15 #include "chrome/common/extensions/manifest_handlers/copresence_manifest.h"
17 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
18 #include "components/copresence/copresence_manager_impl.h" 17 #include "components/copresence/copresence_manager_impl.h"
19 #include "components/copresence/proto/data.pb.h" 18 #include "components/copresence/proto/data.pb.h"
20 #include "components/copresence/proto/enums.pb.h" 19 #include "components/copresence/proto/enums.pb.h"
21 #include "components/copresence/proto/rpcs.pb.h" 20 #include "components/copresence/proto/rpcs.pb.h"
21 #include "components/gcm_driver/gcm_profile_service.h"
22 #include "components/pref_registry/pref_registry_syncable.h" 22 #include "components/pref_registry/pref_registry_syncable.h"
23 #include "content/public/browser/browser_context.h" 23 #include "content/public/browser/browser_context.h"
24 #include "extensions/browser/event_router.h" 24 #include "extensions/browser/event_router.h"
25 #include "extensions/browser/extension_registry.h" 25 #include "extensions/browser/extension_registry.h"
26 #include "extensions/common/extension.h" 26 #include "extensions/common/extension.h"
27 #include "extensions/common/manifest_constants.h" 27 #include "extensions/common/manifest_constants.h"
28 28
29 using user_prefs::PrefRegistrySyncable; 29 using user_prefs::PrefRegistrySyncable;
30 30
31 namespace extensions { 31 namespace extensions {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 scoped_ptr<SetAuthToken::Params> params(SetAuthToken::Params::Create(*args_)); 294 scoped_ptr<SetAuthToken::Params> params(SetAuthToken::Params::Create(*args_));
295 EXTENSION_FUNCTION_VALIDATE(params.get()); 295 EXTENSION_FUNCTION_VALIDATE(params.get());
296 296
297 // The token may be set to empty, to clear it. 297 // The token may be set to empty, to clear it.
298 CopresenceService::GetFactoryInstance()->Get(browser_context()) 298 CopresenceService::GetFactoryInstance()->Get(browser_context())
299 ->set_auth_token(extension_id(), params->token); 299 ->set_auth_token(extension_id(), params->token);
300 return RespondNow(NoArguments()); 300 return RespondNow(NoArguments());
301 } 301 }
302 302
303 } // namespace extensions 303 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/net/wake_on_wifi_manager.cc ('k') | chrome/browser/extensions/api/gcm/gcm_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698