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

Side by Side Diff: components/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: Add missing file 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROMEOS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ 5 #ifndef COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_
6 #define CHROMEOS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ 6 #define COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "chromeos/chromeos_export.h" 11 #include "components/pairing/host_pairing_controller.h"
12 #include "chromeos/pairing/host_pairing_controller.h" 12 #include "components/pairing/pairing_export.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class CHROMEOS_EXPORT FakeHostPairingController 16 class PAIRING_EXPORT FakeHostPairingController
17 : public HostPairingController, 17 : public HostPairingController,
18 public HostPairingController::Observer { 18 public HostPairingController::Observer {
19 public: 19 public:
20 typedef HostPairingController::Observer Observer; 20 typedef HostPairingController::Observer Observer;
21 21
22 // Config is a comma separated list of key-value pairs separated by colon. 22 // Config is a comma separated list of key-value pairs separated by colon.
23 // Supported options: 23 // Supported options:
24 // * async_duration - integer. Default: 3000. 24 // * async_duration - integer. Default: 3000.
25 // * start_after_update - {0,1}. Default: 0. 25 // * start_after_update - {0,1}. Default: 0.
26 // * fail_enrollment - {0,1}. Default: 0. 26 // * fail_enrollment - {0,1}. Default: 0.
27 // * code - 6 digits or empty string. Default: empty string. If strings is 27 // * code - 6 digits or empty string. Default: empty string. If strings is
28 // empty, random code is generated. 28 // empty, random code is generated.
29 // * device_name - string. Default: "Chromebox-01". 29 // * device_name - string. Default: "Chromebox-01".
30 // * domain - string. Default: "example.com". 30 // * domain - string. Default: "example.com".
31 FakeHostPairingController(const std::string& config); 31 explicit FakeHostPairingController(const std::string& config);
32 virtual ~FakeHostPairingController(); 32 virtual ~FakeHostPairingController();
33 33
34 // Applies given |config| to flow. 34 // Applies given |config| to flow.
35 void ApplyConfig(const std::string& config); 35 void ApplyConfig(const std::string& config);
36 36
37 // Overridden from HostPairingFlow: 37 // Overridden from HostPairingFlow:
38 virtual void AddObserver(Observer* observer) OVERRIDE; 38 virtual void AddObserver(Observer* observer) OVERRIDE;
39 virtual void RemoveObserver(Observer* observer) OVERRIDE; 39 virtual void RemoveObserver(Observer* observer) OVERRIDE;
40 virtual Stage GetCurrentStage() OVERRIDE; 40 virtual Stage GetCurrentStage() OVERRIDE;
41 virtual void StartPairing() OVERRIDE; 41 virtual void StartPairing() OVERRIDE;
(...skipping 22 matching lines...) Expand all
64 // Controller starts its work like if update and reboot already happened. 64 // Controller starts its work like if update and reboot already happened.
65 bool start_after_update_; 65 bool start_after_update_;
66 66
67 std::string enrollment_domain_; 67 std::string enrollment_domain_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController); 69 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController);
70 }; 70 };
71 71
72 } // namespace chromeos 72 } // namespace chromeos
73 73
74 #endif // CHROMEOS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ 74 #endif // COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698