OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/policy/cloud/mock_device_management_service.h" | 5 #include "chrome/browser/policy/cloud/mock_device_management_service.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 | 8 |
9 using testing::Action; | 9 using testing::Action; |
10 | 10 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 ACTION_P2(CreateAsyncMockDeviceManagementJob, service, mock_job) { | 110 ACTION_P2(CreateAsyncMockDeviceManagementJob, service, mock_job) { |
111 AsyncRequestJob* job = new AsyncRequestJob(arg0, service); | 111 AsyncRequestJob* job = new AsyncRequestJob(arg0, service); |
112 *mock_job = job; | 112 *mock_job = job; |
113 return job; | 113 return job; |
114 } | 114 } |
115 | 115 |
116 MockDeviceManagementJob::~MockDeviceManagementJob() {} | 116 MockDeviceManagementJob::~MockDeviceManagementJob() {} |
117 | 117 |
118 MockDeviceManagementService::MockDeviceManagementService() | 118 MockDeviceManagementService::MockDeviceManagementService() |
119 : DeviceManagementService("") {} | 119 : DeviceManagementService(std::string()) {} |
120 | 120 |
121 MockDeviceManagementService::~MockDeviceManagementService() {} | 121 MockDeviceManagementService::~MockDeviceManagementService() {} |
122 | 122 |
123 Action<MockDeviceManagementService::CreateJobFunction> | 123 Action<MockDeviceManagementService::CreateJobFunction> |
124 MockDeviceManagementService::SucceedJob( | 124 MockDeviceManagementService::SucceedJob( |
125 const em::DeviceManagementResponse& response) { | 125 const em::DeviceManagementResponse& response) { |
126 return CreateSyncMockDeviceManagementJob(this, DM_STATUS_SUCCESS, response); | 126 return CreateSyncMockDeviceManagementJob(this, DM_STATUS_SUCCESS, response); |
127 } | 127 } |
128 | 128 |
129 Action<MockDeviceManagementService::CreateJobFunction> | 129 Action<MockDeviceManagementService::CreateJobFunction> |
130 MockDeviceManagementService::FailJob(DeviceManagementStatus status) { | 130 MockDeviceManagementService::FailJob(DeviceManagementStatus status) { |
131 const em::DeviceManagementResponse dummy_response; | 131 const em::DeviceManagementResponse dummy_response; |
132 return CreateSyncMockDeviceManagementJob(this, status, dummy_response); | 132 return CreateSyncMockDeviceManagementJob(this, status, dummy_response); |
133 } | 133 } |
134 | 134 |
135 Action<MockDeviceManagementService::CreateJobFunction> | 135 Action<MockDeviceManagementService::CreateJobFunction> |
136 MockDeviceManagementService::CreateAsyncJob(MockDeviceManagementJob** job) { | 136 MockDeviceManagementService::CreateAsyncJob(MockDeviceManagementJob** job) { |
137 return CreateAsyncMockDeviceManagementJob(this, job); | 137 return CreateAsyncMockDeviceManagementJob(this, job); |
138 } | 138 } |
139 | 139 |
140 } // namespace policy | 140 } // namespace policy |
OLD | NEW |