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

Unified Diff: chrome/browser/chromeos/arc/auth/arc_robot_auth.h

Issue 2547073002: Fix race issue in ArcAuthService. (Closed)
Patch Set: Address comments Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/auth/arc_robot_auth.h
diff --git a/chrome/browser/chromeos/arc/auth/arc_robot_auth.h b/chrome/browser/chromeos/arc/auth/arc_robot_auth.h
deleted file mode 100644
index dbcdbe1f7f9adcecd84cc82cd43db239a39f2f55..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/arc/auth/arc_robot_auth.h
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_ROBOT_AUTH_H_
-#define CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_ROBOT_AUTH_H_
-
-#include <memory>
-
-#include "base/callback.h"
-#include "base/macros.h"
-#include "components/policy/core/common/cloud/device_management_service.h"
-
-namespace arc {
-
-// This class is responsible to fetch auth code for robot account. Robot auth
-// code is used for creation an account on Android side in ARC kiosk mode.
-class ArcRobotAuth {
- public:
- using RobotAuthCodeCallback = base::Callback<void(const std::string&)>;
- ArcRobotAuth();
- ~ArcRobotAuth();
-
- // Fetches robot auth code. When auth code is fetched, the callback is
- // invoked. Invoking callback with empty string means a fetch error.
- // FetchRobotAuthCode() should not be called while another inflight operation
- // is running.
- void FetchRobotAuthCode(const RobotAuthCodeCallback& callback);
-
- private:
- void OnFetchRobotAuthCodeCompleted(
- RobotAuthCodeCallback callback,
- policy::DeviceManagementStatus status,
- int net_error,
- const enterprise_management::DeviceManagementResponse& response);
-
- std::unique_ptr<policy::DeviceManagementRequestJob> fetch_request_job_;
- base::WeakPtrFactory<ArcRobotAuth> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ArcRobotAuth);
-};
-
-} // namespace arc
-
-#endif // CHROME_BROWSER_CHROMEOS_ARC_AUTH_ARC_ROBOT_AUTH_H_
« no previous file with comments | « chrome/browser/chromeos/arc/auth/arc_manual_auth_code_fetcher.cc ('k') | chrome/browser/chromeos/arc/auth/arc_robot_auth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698