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

Unified Diff: chromeos/pairing/fake_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: Code review fixes 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/fake_host_pairing_controller.h
diff --git a/chromeos/pairing/fake_host_pairing_controller.h b/chromeos/pairing/fake_host_pairing_controller.h
deleted file mode 100644
index 245e14128bd9d4fc5f757463e97df3640d92a274..0000000000000000000000000000000000000000
--- a/chromeos/pairing/fake_host_pairing_controller.h
+++ /dev/null
@@ -1,74 +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_FAKE_HOST_PAIRING_CONTROLLER_H_
-#define CHROMEOS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_
-
-#include "base/macros.h"
-#include "base/observer_list.h"
-#include "base/time/time.h"
-#include "chromeos/chromeos_export.h"
-#include "chromeos/pairing/host_pairing_controller.h"
-
-namespace chromeos {
-
-class CHROMEOS_EXPORT FakeHostPairingController
- : public HostPairingController,
- public HostPairingController::Observer {
- public:
- typedef HostPairingController::Observer Observer;
-
- // Config is a comma separated list of key-value pairs separated by colon.
- // Supported options:
- // * async_duration - integer. Default: 3000.
- // * start_after_update - {0,1}. Default: 0.
- // * fail_enrollment - {0,1}. Default: 0.
- // * code - 6 digits or empty string. Default: empty string. If strings is
- // empty, random code is generated.
- // * device_name - string. Default: "Chromebox-01".
- // * domain - string. Default: "example.com".
- FakeHostPairingController(const std::string& config);
- virtual ~FakeHostPairingController();
-
- // Applies given |config| to flow.
- void ApplyConfig(const std::string& config);
-
- // Overridden from HostPairingFlow:
- virtual void AddObserver(Observer* observer) OVERRIDE;
- virtual void RemoveObserver(Observer* observer) OVERRIDE;
- virtual Stage GetCurrentStage() OVERRIDE;
- virtual void StartPairing() OVERRIDE;
- virtual std::string GetDeviceName() OVERRIDE;
- virtual std::string GetConfirmationCode() OVERRIDE;
- virtual std::string GetEnrollmentDomain() OVERRIDE;
-
- private:
- void ChangeStage(Stage new_stage);
- void ChangeStageLater(Stage new_stage);
- void SetUpdateProgress(int step);
-
- // Overridden from HostPairingFlow::Observer:
- virtual void PairingStageChanged(Stage new_stage) OVERRIDE;
- virtual void UpdateAdvanced(const UpdateProgress& progress) OVERRIDE;
-
- ObserverList<Observer> observers_;
- Stage current_stage_;
- std::string device_name_;
- std::string confirmation_code_;
- base::TimeDelta async_duration_;
-
- // If this flag is true error happens on |STAGE_ENROLLING| once.
- bool enrollment_should_fail_;
-
- // Controller starts its work like if update and reboot already happened.
- bool start_after_update_;
-
- std::string enrollment_domain_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController);
-};
-
-} // namespace chromeos
-
-#endif // CHROMEOS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698