Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Side by Side Diff: chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h

Issue 12538009: Public Sessions: fetch device robot api token during enterprise enrollment. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: updated tests Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 namespace policy {
11 namespace test {
12 class DeviceCloudPolicyManagerChromeOSTest;
13 }
14 }
15
10 namespace chromeos { 16 namespace chromeos {
11 17
12 class DeviceOAuth2TokenService; 18 class DeviceOAuth2TokenService;
13 19
14 class DeviceOAuth2TokenServiceFactory { 20 class DeviceOAuth2TokenServiceFactory {
15 public: 21 public:
16 // Returns the instance of the DeviceOAuth2TokenService singleton. 22 // Returns the instance of the DeviceOAuth2TokenService singleton.
17 // May return null during browser startup and shutdown. Do not hold 23 // May return null during browser startup and shutdown. Do not hold
18 // the pointer returned by this method; call this method every time 24 // 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 25 // and check for null to handle the case where this instance is destroyed
20 // during shutdown. 26 // during shutdown.
21 static DeviceOAuth2TokenService* Get(); 27 static DeviceOAuth2TokenService* Get();
22 28
23 private: 29 private:
24 friend class ChromeBrowserMainPartsChromeos; 30 friend class ChromeBrowserMainPartsChromeos;
31 friend class policy::test::DeviceCloudPolicyManagerChromeOSTest;
Mattias Nissler (ping if slow) 2013/04/22 10:59:00 I'd jus tmake Initialize() and Shutdown() public.
David Roche 2013/04/23 01:36:08 Done.
25 32
26 DeviceOAuth2TokenServiceFactory(); 33 DeviceOAuth2TokenServiceFactory();
27 34
28 // Called by ChromeBrowserMainPartsChromeOS in order to bootstrap the 35 // Called by ChromeBrowserMainPartsChromeOS in order to bootstrap the
29 // DeviceOAuth2TokenService instance after the required global data is 36 // DeviceOAuth2TokenService instance after the required global data is
30 // available (local state and request context getter). 37 // available (local state and request context getter).
31 static void Initialize(); 38 static void Initialize();
32 39
33 // Called by ChromeBrowserMainPartsChromeOS in order to shutdown the 40 // Called by ChromeBrowserMainPartsChromeOS in order to shutdown the
34 // DeviceOAuth2TokenService instance and cancel all in-flight requests 41 // DeviceOAuth2TokenService instance and cancel all in-flight requests
35 // before the required global data is destroyed (local state and request 42 // before the required global data is destroyed (local state and request
36 // context getter). 43 // context getter).
37 static void Shutdown(); 44 static void Shutdown();
38 45
39 DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenServiceFactory); 46 DISALLOW_COPY_AND_ASSIGN(DeviceOAuth2TokenServiceFactory);
40 }; 47 };
41 48
42 } // namespace chromeos 49 } // namespace chromeos
43 50
44 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_ H_ 51 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_OAUTH2_TOKEN_SERVICE_FACTORY_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698