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

Side by Side Diff: chrome/browser/chromeos/arc/auth/arc_robot_auth_code_fetcher.h

Issue 2655873002: Get enrollment token from DMServer when an Active Directory user uses ARC (Closed)
Patch Set: Fix Luis's comments Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ARC_AUTH_ARC_ROBOT_AUTH_CODE_FETCHER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_ROBOT_AUTH_CODE_FETCHER_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_ROBOT_AUTH_CODE_FETCHER_H_ 6 #define CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_ROBOT_AUTH_CODE_FETCHER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/chromeos/arc/auth/arc_auth_code_fetcher.h" 13 #include "chrome/browser/chromeos/arc/auth/arc_auth_info_fetcher.h"
14 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 14 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
15 15
16 namespace enterprise_management { 16 namespace enterprise_management {
17 class DeviceManagementResponse; 17 class DeviceManagementResponse;
18 } 18 }
19 19
20 namespace policy { 20 namespace policy {
21 class DeviceManagementRequestJob; 21 class DeviceManagementRequestJob;
22 } 22 }
23 23
24 namespace arc { 24 namespace arc {
25 25
26 // This class is responsible to fetch auth code for robot account. Robot auth 26 // This class is responsible to fetch auth code for robot account. Robot auth
27 // code is used for creation an account on Android side in ARC kiosk mode. 27 // code is used for creation an account on Android side in ARC kiosk mode.
28 class ArcRobotAuthCodeFetcher : public ArcAuthCodeFetcher { 28 class ArcRobotAuthCodeFetcher : public ArcAuthInfoFetcher {
29 public: 29 public:
30 ArcRobotAuthCodeFetcher(); 30 ArcRobotAuthCodeFetcher();
31 ~ArcRobotAuthCodeFetcher() override; 31 ~ArcRobotAuthCodeFetcher() override;
32 32
33 // ArcAuthCodeFetcher: 33 // ArcAuthInfoFetcher:
34 void Fetch(const FetchCallback& callback) override; 34 void Fetch(const FetchCallback& callback) override;
35 35
36 private: 36 private:
37 void OnFetchRobotAuthCodeCompleted( 37 void OnFetchRobotAuthCodeCompleted(
38 FetchCallback callback, 38 FetchCallback callback,
39 policy::DeviceManagementStatus status, 39 policy::DeviceManagementStatus status,
40 int net_error, 40 int net_error,
41 const enterprise_management::DeviceManagementResponse& response); 41 const enterprise_management::DeviceManagementResponse& response);
42 42
43 std::unique_ptr<policy::DeviceManagementRequestJob> fetch_request_job_; 43 std::unique_ptr<policy::DeviceManagementRequestJob> fetch_request_job_;
44 base::WeakPtrFactory<ArcRobotAuthCodeFetcher> weak_ptr_factory_; 44 base::WeakPtrFactory<ArcRobotAuthCodeFetcher> weak_ptr_factory_;
45 45
46 DISALLOW_COPY_AND_ASSIGN(ArcRobotAuthCodeFetcher); 46 DISALLOW_COPY_AND_ASSIGN(ArcRobotAuthCodeFetcher);
47 }; 47 };
48 48
49 } // namespace arc 49 } // namespace arc
50 50
51 #endif // CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_ROBOT_AUTH_CODE_FETCHER_H_ 51 #endif // CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_ROBOT_AUTH_CODE_FETCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698