Index: chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h |
diff --git a/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h b/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h |
index f6c8637c2784cb01d6db84e38cbafce2a4ecebd0..981c81b51afba8aa1a99f9634b171defc211c111 100644 |
--- a/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h |
+++ b/chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h |
@@ -6,6 +6,7 @@ |
#define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_ |
#include "base/basictypes.h" |
+#include "base/callback_forward.h" |
namespace chromeos { |
@@ -13,12 +14,18 @@ class DeviceOAuth2TokenService; |
class DeviceOAuth2TokenServiceFactory { |
public: |
- // Returns the instance of the DeviceOAuth2TokenService singleton. |
- // May return null during browser startup and shutdown. Do not hold |
- // the pointer returned by this method; call this method every time |
- // and check for null to handle the case where this instance is destroyed |
- // during shutdown. |
- static DeviceOAuth2TokenService* Get(); |
+ // Callback type used for Get() function. |
+ typedef base::Callback<void(DeviceOAuth2TokenService*)> GetCallback; |
+ |
+ // Returns the instance of the DeviceOAuth2TokenService singleton via the |
+ // given callback. This function is asynchronous as initializing |
+ // DeviceOAuth2TokenService involves asynchronous D-Bus method calls. |
+ // |
+ // May return null during browser startup and shutdown. Do not hold the |
pneubeck (no reviews)
2013/10/22 09:05:03
nit: null -> NULL
satorux1
2013/10/22 09:56:43
will fix.
satorux1
2013/10/23 06:35:44
Done.
|
+ // pointer returned by this method; call this method every time and check |
+ // for null to handle the case where this instance is destroyed during |
pneubeck (no reviews)
2013/10/22 09:05:03
dito
satorux1
2013/10/22 09:56:43
will fix.
satorux1
2013/10/23 06:35:44
Done.
|
+ // shutdown. |
+ static void Get(const GetCallback& callback); |
// Called by ChromeBrowserMainPartsChromeOS in order to bootstrap the |
// DeviceOAuth2TokenService instance after the required global data is |
@@ -33,6 +40,9 @@ class DeviceOAuth2TokenServiceFactory { |
private: |
DeviceOAuth2TokenServiceFactory(); |
+ ~DeviceOAuth2TokenServiceFactory(); |
+ |
+ DeviceOAuth2TokenService* token_service_; |
DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenServiceFactory); |
}; |