Chromium Code Reviews| 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 | |
| 10 namespace chromeos { | |
| 11 | |
| 12 class DeviceOAuth2TokenService; | |
| 13 | |
| 14 class DeviceOAuth2TokenServiceFactory { | |
| 15 public: | |
| 16 // Returns the instance of the DeviceOAuth2TokenService singleton. | |
| 17 // May return null during browser startup and shutdown. Do not hold | |
| 18 // the pointer returned by this method; call this method every time | |
| 19 // and check for null to handle the case where this instance is destroyed | |
| 20 // during shutdown. | |
| 21 static DeviceOAuth2TokenService* Get(); | |
| 22 | |
| 23 private: | |
| 24 friend class ChromeBrowserMainPartsChromeos; | |
| 25 | |
| 26 DeviceOAuth2TokenServiceFactory(); | |
| 27 | |
| 28 // Called by ChromeBrowserMainPartsChromeOS in order to bootstrap our | |
| 29 // DeviceOAuth2TokenService instance after the required global data is | |
| 30 // available (local state and request context getter). | |
|
brettw
2013/04/05 21:58:03
Can you state the requirements for when shutdown s
| |
| 31 static void Initialize(); | |
| 32 static void Shutdown(); | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenServiceFactory); | |
| 35 }; | |
| 36 | |
| 37 } // namespace chromeos | |
| 38 | |
| 39 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_ H_ | |
| OLD | NEW |