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

Unified Diff: chrome/browser/chromeos/policy/consumer_enrollment_handler.h

Issue 2230533002: Delete dead consumer enrollment code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/consumer_enrollment_handler.h
diff --git a/chrome/browser/chromeos/policy/consumer_enrollment_handler.h b/chrome/browser/chromeos/policy/consumer_enrollment_handler.h
deleted file mode 100644
index 02b22a15a732e7160ee97cc0260257322f3539b1..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/policy/consumer_enrollment_handler.h
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright 2014 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_POLICY_CONSUMER_ENROLLMENT_HANDLER_H_
-#define CHROME_BROWSER_CHROMEOS_POLICY_CONSUMER_ENROLLMENT_HANDLER_H_
-
-#include <memory>
-#include <string>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "components/keyed_service/core/keyed_service.h"
-#include "google_apis/gaia/oauth2_token_service.h"
-
-class Profile;
-
-namespace policy {
-
-class ConsumerManagementService;
-class ConsumerManagementStage;
-class DeviceManagementService;
-class EnrollmentStatus;
-
-// Consumer enrollment handler automatically continues the enrollment process
-// after the owner ID is stored in the boot lockbox and thw owner signs in.
-class ConsumerEnrollmentHandler
- : public KeyedService,
- public OAuth2TokenService::Consumer,
- public OAuth2TokenService::Observer {
- public:
- ConsumerEnrollmentHandler(
- Profile* profile,
- ConsumerManagementService* consumer_management_service,
- DeviceManagementService* device_management_service);
- ~ConsumerEnrollmentHandler() override;
-
- void Shutdown() override;
-
- // OAuth2TokenService::Observer:
- void OnRefreshTokenAvailable(const std::string& account_id) override;
-
- // OAuth2TokenService::Consumer:
- void OnGetTokenSuccess(
- const OAuth2TokenService::Request* request,
- const std::string& access_token,
- const base::Time& expiration_time) override;
- void OnGetTokenFailure(
- const OAuth2TokenService::Request* request,
- const GoogleServiceAuthError& error) override;
-
- OAuth2TokenService::Request* GetTokenRequestForTesting() {
- return token_request_.get();
- }
-
- private:
- // Continues the enrollment process after the owner ID is stored into the boot
- // lockbox and the owner signs in.
- void ContinueEnrollmentProcess();
-
- // Called when the owner's refresh token is available.
- void OnOwnerRefreshTokenAvailable();
-
- // Called when the owner's access token for device management is available.
- void OnOwnerAccessTokenAvailable(const std::string& access_token);
-
- // Called upon the completion of the enrollment process.
- void OnEnrollmentCompleted(EnrollmentStatus status);
-
- // Ends the enrollment process.
- void EndEnrollment(const ConsumerManagementStage& stage);
-
- Profile* profile_;
- ConsumerManagementService* consumer_management_service_;
- DeviceManagementService* device_management_service_;
- std::string gaia_account_id_;
-
- std::unique_ptr<OAuth2TokenService::Request> token_request_;
- base::WeakPtrFactory<ConsumerEnrollmentHandler> weak_ptr_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(ConsumerEnrollmentHandler);
-};
-
-} // namespace policy
-
-#endif // CHROME_BROWSER_CHROMEOS_POLICY_CONSUMER_ENROLLMENT_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698