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

Side by Side Diff: chrome/browser/policy/mock_device_management_backend.h

Issue 9064006: Convert DeviceTokenFetcher and CloudPolicyController response callbacks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits Created 8 years, 11 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 (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 #ifndef CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 5 #ifndef CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
6 #define CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 6 #define CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "chrome/browser/policy/device_management_backend.h" 12 #include "chrome/browser/policy/device_management_backend.h"
13 #include "chrome/browser/policy/proto/cloud_policy.pb.h" 13 #include "chrome/browser/policy/proto/cloud_policy.pb.h"
14 #include "chrome/browser/policy/proto/device_management_backend.pb.h" 14 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
15 #include "chrome/browser/policy/proto/device_management_constants.h"
16 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
18 17
19 namespace policy { 18 namespace policy {
20 19
21 // Useful for unit testing when a server-based backend isn't 20 // Useful for unit testing when a server-based backend isn't
22 // available. Simulates both successful and failed requests to the device 21 // available. Simulates both successful and failed requests to the device
23 // management server. 22 // management server.
24 class MockDeviceManagementBackend : public DeviceManagementBackend { 23 class MockDeviceManagementBackend : public DeviceManagementBackend {
25 public: 24 public:
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 arg4->OnError(error); 95 arg4->OnError(error);
97 } 96 }
98 97
99 ACTION_P(MockDeviceManagementBackendFailPolicy, error) { 98 ACTION_P(MockDeviceManagementBackendFailPolicy, error) {
100 arg5->OnError(error); 99 arg5->OnError(error);
101 } 100 }
102 101
103 } // namespace policy 102 } // namespace policy
104 103
105 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_ 104 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_BACKEND_H_
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_token_fetcher_unittest.cc ('k') | chrome/browser/policy/proto/device_management_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698