OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" |
| 11 |
| 12 namespace base { |
| 13 template <typename T> struct DefaultLazyInstanceTraits; |
| 14 } |
| 15 |
| 16 namespace chromeos { |
| 17 |
| 18 class DeviceOAuth2TokenServiceFactory { |
| 19 public: |
| 20 // Returns the instance of the DeviceOAuth2TokenService singleton. |
| 21 static DeviceOAuth2TokenService* Get(); |
| 22 |
| 23 private: |
| 24 friend struct base::DefaultLazyInstanceTraits< |
| 25 chromeos::DeviceOAuth2TokenServiceFactory>; |
| 26 DeviceOAuth2TokenServiceFactory(); |
| 27 virtual ~DeviceOAuth2TokenServiceFactory(); |
| 28 |
| 29 DeviceOAuth2TokenService* GetImpl(); |
| 30 |
| 31 scoped_ptr<DeviceOAuth2TokenService> device_oauth2_token_service_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenServiceFactory); |
| 34 }; |
| 35 |
| 36 } // namespace chromeos |
| 37 |
| 38 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_
H_ |
OLD | NEW |