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

Side by Side Diff: components/wifi_sync/wifi_credential_syncable_service_factory.cc

Issue 709683004: components: add wifi_sync component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-1-security-class
Patch Set: Created 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/wifi_sync/wifi_credential_syncable_service_factory.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "components/wifi_sync/wifi_credential_syncable_service.h"
10
11 namespace wifi_sync {
12
13 // static
14 WifiCredentialSyncableService*
15 WifiCredentialSyncableServiceFactory::GetForProfile(Profile* profile) {
16 return static_cast<WifiCredentialSyncableService*>(
17 GetInstance()->GetServiceForBrowserContext(profile, true));
18 }
19
20 // static
21 WifiCredentialSyncableServiceFactory*
22 WifiCredentialSyncableServiceFactory::GetInstance() {
23 return Singleton<WifiCredentialSyncableServiceFactory>::get();
24 }
25
26 WifiCredentialSyncableServiceFactory::WifiCredentialSyncableServiceFactory()
27 : BrowserContextKeyedServiceFactory(
28 "WifiCredentialSyncableService",
29 BrowserContextDependencyManager::GetInstance()) {
30 }
31
32 WifiCredentialSyncableServiceFactory::~WifiCredentialSyncableServiceFactory() {
33 }
34
35 KeyedService* WifiCredentialSyncableServiceFactory::BuildServiceInstanceFor(
36 content::BrowserContext* context) const {
37 // TODO(quiche): Figure out if this behaves properly for multi-profile.
38 // crbug.com/430681.
stevenjb 2014/11/12 21:30:44 Hmm, we probably need to add a helper method to sr
mukesh agrawal 2014/11/13 16:24:59 I'd guess that asserting is too strong, because it
stevenjb 2014/11/13 22:55:35 Unfortunately ProfileHelper is in src/chrome so we
mukesh agrawal 2014/11/14 02:14:54 I take it the idea is that components shouldn't de
39 return new WifiCredentialSyncableService(context);
40 }
41
42 } // namespace wifi_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698