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

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: compoent -> source set 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"
13 12
14 namespace chromeos { 13 namespace pairing_chromeos {
15 14
16 class CHROMEOS_EXPORT FakeHostPairingController 15 class FakeHostPairingController
17 : public HostPairingController, 16 : public HostPairingController,
18 public HostPairingController::Observer { 17 public HostPairingController::Observer {
19 public: 18 public:
20 typedef HostPairingController::Observer Observer; 19 typedef HostPairingController::Observer Observer;
21 20
22 // Config is a comma separated list of key-value pairs separated by colon. 21 // Config is a comma separated list of key-value pairs separated by colon.
23 // Supported options: 22 // Supported options:
24 // * async_duration - integer. Default: 3000. 23 // * async_duration - integer. Default: 3000.
25 // * start_after_update - {0,1}. Default: 0. 24 // * start_after_update - {0,1}. Default: 0.
26 // * fail_enrollment - {0,1}. Default: 0. 25 // * fail_enrollment - {0,1}. Default: 0.
27 // * code - 6 digits or empty string. Default: empty string. If strings is 26 // * code - 6 digits or empty string. Default: empty string. If strings is
28 // empty, random code is generated. 27 // empty, random code is generated.
29 // * device_name - string. Default: "Chromebox-01". 28 // * device_name - string. Default: "Chromebox-01".
30 // * domain - string. Default: "example.com". 29 // * domain - string. Default: "example.com".
31 FakeHostPairingController(const std::string& config); 30 explicit FakeHostPairingController(const std::string& config);
32 virtual ~FakeHostPairingController(); 31 virtual ~FakeHostPairingController();
33 32
34 // Applies given |config| to flow. 33 // Applies given |config| to flow.
35 void ApplyConfig(const std::string& config); 34 void ApplyConfig(const std::string& config);
36 35
37 // Overridden from HostPairingFlow: 36 // Overridden from HostPairingFlow:
38 virtual void AddObserver(Observer* observer) OVERRIDE; 37 virtual void AddObserver(Observer* observer) OVERRIDE;
39 virtual void RemoveObserver(Observer* observer) OVERRIDE; 38 virtual void RemoveObserver(Observer* observer) OVERRIDE;
40 virtual Stage GetCurrentStage() OVERRIDE; 39 virtual Stage GetCurrentStage() OVERRIDE;
41 virtual void StartPairing() OVERRIDE; 40 virtual void StartPairing() OVERRIDE;
(...skipping 20 matching lines...) Expand all
62 bool enrollment_should_fail_; 61 bool enrollment_should_fail_;
63 62
64 // Controller starts its work like if update and reboot already happened. 63 // Controller starts its work like if update and reboot already happened.
65 bool start_after_update_; 64 bool start_after_update_;
66 65
67 std::string enrollment_domain_; 66 std::string enrollment_domain_;
68 67
69 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController); 68 DISALLOW_COPY_AND_ASSIGN(FakeHostPairingController);
70 }; 69 };
71 70
72 } // namespace chromeos 71 } // namespace pairing_chromeos
73 72
74 #endif // CHROMEOS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_ 73 #endif // COMPONENTS_PAIRING_FAKE_HOST_PAIRING_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/pairing/fake_controller_pairing_controller.cc ('k') | components/pairing/fake_host_pairing_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698