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

Side by Side Diff: chrome/browser/chromeos/policy/fake_consumer_management_service.h

Issue 733613005: Move the notification part out of ConsumerEnrollmentHandler so that it can be reused for unenrollme… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@enroll
Patch Set: Created 6 years, 1 month 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
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 CHROME_BROWSER_CHROMEOS_POLICY_FAKE_CONSUMER_MANAGEMENT_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_FAKE_CONSUMER_MANAGEMENT_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_FAKE_CONSUMER_MANAGEMENT_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_FAKE_CONSUMER_MANAGEMENT_SERVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/chromeos/policy/consumer_management_service.h" 9 #include "chrome/browser/chromeos/policy/consumer_management_service.h"
10 10
11 namespace policy { 11 namespace policy {
12 12
13 class FakeConsumerManagementService : public ConsumerManagementService { 13 class FakeConsumerManagementService : public ConsumerManagementService {
14 public: 14 public:
15 FakeConsumerManagementService(); 15 FakeConsumerManagementService();
16 virtual ~FakeConsumerManagementService(); 16 virtual ~FakeConsumerManagementService();
17 17
18 // Set both status and enrollment stage.
19 void SetStatusAndEnrollmentStage(Status status, EnrollmentStage stage);
20
18 // ConsumerManagementServcie: 21 // ConsumerManagementServcie:
19 virtual Status GetStatus() const override; 22 virtual Status GetStatus() const override;
20 virtual EnrollmentStage GetEnrollmentStage() const override; 23 virtual EnrollmentStage GetEnrollmentStage() const override;
21 virtual void SetEnrollmentStage(EnrollmentStage stage) override; 24 virtual void SetEnrollmentStage(EnrollmentStage stage) override;
22 25
23 EnrollmentStage enrollment_stage_before_reset() const {
24 return enrollment_stage_before_reset_;
25 }
26
27 void set_status(Status status) {
28 status_ = status;
29 }
30
31 private: 26 private:
32 Status status_; 27 Status status_;
33 EnrollmentStage enrollment_stage_; 28 EnrollmentStage enrollment_stage_;
34 EnrollmentStage enrollment_stage_before_reset_;
35 29
36 DISALLOW_COPY_AND_ASSIGN(FakeConsumerManagementService); 30 DISALLOW_COPY_AND_ASSIGN(FakeConsumerManagementService);
37 }; 31 };
38 32
39 } // namespace policy 33 } // namespace policy
40 34
41 #endif // CHROME_BROWSER_CHROMEOS_POLICY_FAKE_CONSUMER_MANAGEMENT_SERVICE_H_ 35 #endif // CHROME_BROWSER_CHROMEOS_POLICY_FAKE_CONSUMER_MANAGEMENT_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698