| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_POLICY_TESTING_CLOUD_POLICY_SUBSYSTEM_H_ | 5 #ifndef CHROME_BROWSER_POLICY_TESTING_CLOUD_POLICY_SUBSYSTEM_H_ |
| 6 #define CHROME_BROWSER_POLICY_TESTING_CLOUD_POLICY_SUBSYSTEM_H_ | 6 #define CHROME_BROWSER_POLICY_TESTING_CLOUD_POLICY_SUBSYSTEM_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/policy/cloud_policy_subsystem.h" | 9 #include "chrome/browser/policy/cloud_policy_subsystem.h" |
| 10 | 10 |
| 11 namespace policy { | 11 namespace policy { |
| 12 | 12 |
| 13 class CloudPolicyCacheBase; |
| 13 class CloudPolicyDataStore; | 14 class CloudPolicyDataStore; |
| 14 class EventLogger; | 15 class EventLogger; |
| 15 | 16 |
| 16 // A CloudPolicySubsystem for testing: it uses EventLogger to issue delayed | 17 // A CloudPolicySubsystem for testing: it uses EventLogger to issue delayed |
| 17 // tasks with 0 effective delay, and log the times of their executions. | 18 // tasks with 0 effective delay, and log the times of their executions. |
| 18 class TestingCloudPolicySubsystem : public CloudPolicySubsystem { | 19 class TestingCloudPolicySubsystem : public CloudPolicySubsystem { |
| 19 public: | 20 public: |
| 20 // Takes ownership of |policy_cache|. | 21 // Takes ownership of |policy_cache|. |
| 21 TestingCloudPolicySubsystem(CloudPolicyDataStore* data, | 22 TestingCloudPolicySubsystem(CloudPolicyDataStore* data, |
| 22 CloudPolicyCacheBase* policy_cache, | 23 CloudPolicyCacheBase* policy_cache, |
| 23 const std::string& device_management_url, | 24 const std::string& device_management_url, |
| 24 EventLogger* logger); | 25 EventLogger* logger); |
| 25 | 26 |
| 26 private: | 27 private: |
| 27 virtual void CreateDeviceTokenFetcher() OVERRIDE; | 28 virtual void CreateDeviceTokenFetcher() OVERRIDE; |
| 28 virtual void CreateCloudPolicyController() OVERRIDE; | 29 virtual void CreateCloudPolicyController() OVERRIDE; |
| 29 | 30 |
| 30 EventLogger* logger_; | 31 EventLogger* logger_; |
| 31 | 32 |
| 32 DISALLOW_COPY_AND_ASSIGN(TestingCloudPolicySubsystem); | 33 DISALLOW_COPY_AND_ASSIGN(TestingCloudPolicySubsystem); |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace Policy | 36 } // namespace Policy |
| 36 | 37 |
| 37 #endif // CHROME_BROWSER_POLICY_TESTING_CLOUD_POLICY_SUBSYSTEM_H_ | 38 #endif // CHROME_BROWSER_POLICY_TESTING_CLOUD_POLICY_SUBSYSTEM_H_ |
| OLD | NEW |