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

Unified Diff: chromeos/pairing/host_pairing_controller.h

Issue 387163002: Move Chrome OS pairing interface to chrome/browser/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Leave chromeos/pairing intact for try jobs Created 6 years, 5 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: chromeos/pairing/host_pairing_controller.h
diff --git a/chromeos/pairing/host_pairing_controller.h b/chromeos/pairing/host_pairing_controller.h
deleted file mode 100644
index 5adf5eaa176f6bac8ac7449d0e4d2d8f91c7f252..0000000000000000000000000000000000000000
--- a/chromeos/pairing/host_pairing_controller.h
+++ /dev/null
@@ -1,80 +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 CHROMEOS_PAIRING_HOST_PAIRING_CONTROLLER_H_
-#define CHROMEOS_PAIRING_HOST_PAIRING_CONTROLLER_H_
-
-#include <string>
-
-#include "base/macros.h"
-#include "chromeos/chromeos_export.h"
-
-namespace chromeos {
-
-class CHROMEOS_EXPORT HostPairingController {
- public:
- enum Stage {
- STAGE_NONE,
- STAGE_WAITING_FOR_CONTROLLER,
- STAGE_WAITING_FOR_CODE_CONFIRMATION,
- STAGE_UPDATING,
- STAGE_WAITING_FOR_CONTROLLER_AFTER_UPDATE,
- STAGE_WAITING_FOR_CREDENTIALS,
- STAGE_ENROLLING,
- STAGE_ENROLLMENT_ERROR,
- STAGE_PAIRING_DONE,
- STAGE_FINISHED
- };
-
- struct UpdateProgress {
- // Number in [0, 1].
- double progress;
- };
-
- class Observer {
- public:
- Observer();
- virtual ~Observer();
-
- // Called when pairing has moved on from one stage to another.
- virtual void PairingStageChanged(Stage new_stage) = 0;
-
- // Called periodically on |STAGE_UPDATING| stage. Current update progress
- // is stored in |progress|.
- virtual void UpdateAdvanced(const UpdateProgress& progress) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Observer);
- };
-
- HostPairingController();
- virtual ~HostPairingController();
-
- virtual void AddObserver(Observer* observer) = 0;
- virtual void RemoveObserver(Observer* observer) = 0;
-
- // Returns current stage of pairing process.
- virtual Stage GetCurrentStage() = 0;
-
- // Starts pairing process. Can be called only on |STAGE_NONE| stage.
- virtual void StartPairing() = 0;
-
- // Returns device name.
- virtual std::string GetDeviceName() = 0;
-
- // Returns 6-digit confirmation code. Can be called only on
- // |STAGE_WAITING_FOR_CODE_CONFIRMATION| stage.
- virtual std::string GetConfirmationCode() = 0;
-
- // Returns an enrollment domain name. Can be called on stage
- // |STAGE_ENROLLMENT| and later.
- virtual std::string GetEnrollmentDomain() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(HostPairingController);
-};
-
-} // namespace chromeos
-
-#endif // CHROMEOS_PAIRING_HOST_PAIRING_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698