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

Side by Side Diff: chrome/browser/chromeos/login/mock_signed_settings_helper.h

Issue 7345010: Tests for cloud policy UMA metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reviewed, rebased Created 9 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_signed_settings_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "chrome/browser/chromeos/login/signed_settings_helper.h"
11 #include "chrome/browser/policy/proto/device_management_backend.pb.h"
gfeher 2011/07/21 09:46:37 Maybe you can remove this because you are only usi
12 #include "testing/gmock/include/gmock/gmock.h"
13
14 namespace chromeos {
15
16 class MockSignedSettingsHelper : public chromeos::SignedSettingsHelper {
17 public:
18 MockSignedSettingsHelper();
19 virtual ~MockSignedSettingsHelper();
20
21 MOCK_METHOD2(StartCheckWhitelistOp,
22 void(const std::string& email, Callback*));
23 MOCK_METHOD3(StartWhitelistOp,
24 void(const std::string&, bool, Callback*));
25 MOCK_METHOD3(StartStorePropertyOp,
26 void(const std::string&, const std::string&, Callback*));
27 MOCK_METHOD2(StartRetrieveProperty,
28 void(const std::string&, Callback*));
29 MOCK_METHOD2(StartStorePolicyOp,
30 void(const em::PolicyFetchResponse&, Callback*));
31 MOCK_METHOD1(StartRetrievePolicyOp, void(Callback* callback));
32 MOCK_METHOD1(CancelCallback, void(Callback*));
33
34 private:
35 DISALLOW_COPY_AND_ASSIGN(MockSignedSettingsHelper);
36 };
37
38 ACTION_P(MockSignedSettingsHelperStorePolicy, status_code) {
39 arg1->OnStorePolicyCompleted(status_code);
40 }
41
42 ACTION_P2(MockSignedSettingsHelperRetrievePolicy, status_code, policy) {
43 arg0->OnRetrievePolicyCompleted(status_code, policy);
44 }
45
46 } // namespace chromeos
47
48 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_signed_settings_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698