| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // Returns the singleton instance. | 34 // Returns the singleton instance. |
| 35 static WifiCredentialSyncableServiceFactory* GetInstance(); | 35 static WifiCredentialSyncableServiceFactory* GetInstance(); |
| 36 | 36 |
| 37 #if defined(OS_CHROMEOS) | 37 #if defined(OS_CHROMEOS) |
| 38 void set_ignore_login_state_for_test(bool new_value) { | 38 void set_ignore_login_state_for_test(bool new_value) { |
| 39 ignore_login_state_for_test_ = new_value; | 39 ignore_login_state_for_test_ = new_value; |
| 40 } | 40 } |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 friend struct DefaultSingletonTraits<WifiCredentialSyncableServiceFactory>; | 44 friend struct base::DefaultSingletonTraits< |
| 45 WifiCredentialSyncableServiceFactory>; |
| 45 | 46 |
| 46 WifiCredentialSyncableServiceFactory(); | 47 WifiCredentialSyncableServiceFactory(); |
| 47 ~WifiCredentialSyncableServiceFactory() override; | 48 ~WifiCredentialSyncableServiceFactory() override; |
| 48 | 49 |
| 49 // BrowserContextKeyedServiceFactory implementation. | 50 // BrowserContextKeyedServiceFactory implementation. |
| 50 KeyedService* BuildServiceInstanceFor( | 51 KeyedService* BuildServiceInstanceFor( |
| 51 content::BrowserContext* context) const override; | 52 content::BrowserContext* context) const override; |
| 52 | 53 |
| 53 #if defined(OS_CHROMEOS) | 54 #if defined(OS_CHROMEOS) |
| 54 // Returns a scoped pointer to a WifiConfigDelegate, which can be | 55 // Returns a scoped pointer to a WifiConfigDelegate, which can be |
| (...skipping 10 matching lines...) Expand all Loading... |
| 65 // LoginState at the time SyncableServices are constructed. | 66 // LoginState at the time SyncableServices are constructed. |
| 66 bool ignore_login_state_for_test_ = false; | 67 bool ignore_login_state_for_test_ = false; |
| 67 #endif | 68 #endif |
| 68 | 69 |
| 69 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory); | 70 DISALLOW_COPY_AND_ASSIGN(WifiCredentialSyncableServiceFactory); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace wifi_sync | 73 } // namespace wifi_sync |
| 73 | 74 |
| 74 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ | 75 #endif // COMPONENTS_WIFI_SYNC_WIFI_CREDENTIAL_SYNCABLE_SERVICE_FACTORY_H_ |
| OLD | NEW |