OLD | NEW |
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 #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ | 5 #ifndef COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |
6 #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ | 6 #define COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
11 #include "build/build_config.h" | 12 #include "build/build_config.h" |
12 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 13 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 class BrowserContext; | 16 class BrowserContext; |
16 } | 17 } |
17 | 18 |
18 namespace wifi_sync { | 19 namespace wifi_sync { |
19 | 20 |
(...skipping 29 matching lines...) Expand all Loading... |
49 ~WifiCredentialSyncableServiceFactory() override; | 50 ~WifiCredentialSyncableServiceFactory() override; |
50 | 51 |
51 // BrowserContextKeyedServiceFactory implementation. | 52 // BrowserContextKeyedServiceFactory implementation. |
52 KeyedService* BuildServiceInstanceFor( | 53 KeyedService* BuildServiceInstanceFor( |
53 content::BrowserContext* context) const override; | 54 content::BrowserContext* context) const override; |
54 | 55 |
55 #if defined(OS_CHROMEOS) | 56 #if defined(OS_CHROMEOS) |
56 // Returns a scoped pointer to a WifiConfigDelegate, which can be | 57 // Returns a scoped pointer to a WifiConfigDelegate, which can be |
57 // used to configure the ChromeOS Wi-Fi settings associated with | 58 // used to configure the ChromeOS Wi-Fi settings associated with |
58 // |context|. | 59 // |context|. |
59 scoped_ptr<WifiConfigDelegate> BuildWifiConfigDelegateChromeOs( | 60 std::unique_ptr<WifiConfigDelegate> BuildWifiConfigDelegateChromeOs( |
60 content::BrowserContext* context) const; | 61 content::BrowserContext* context) const; |
61 #endif | 62 #endif |
62 | 63 |
63 #if defined(OS_CHROMEOS) | 64 #if defined(OS_CHROMEOS) |
64 // Whether or not we should use LoginState to associate a new | 65 // Whether or not we should use LoginState to associate a new |
65 // SyncableService with a Shill profile. Should be set to true in | 66 // SyncableService with a Shill profile. Should be set to true in |
66 // sync integration tests, where it is not possible to control | 67 // sync integration tests, where it is not possible to control |
67 // LoginState at the time SyncableServices are constructed. | 68 // LoginState at the time SyncableServices are constructed. |
68 bool ignore_login_state_for_test_ = false; | 69 bool ignore_login_state_for_test_ = false; |
69 #endif | 70 #endif |
70 | 71 |
71 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory); | 72 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory); |
72 }; | 73 }; |
73 | 74 |
74 } // namespace wifi_sync | 75 } // namespace wifi_sync |
75 | 76 |
76 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ | 77 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |
OLD | NEW |