| 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_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "chrome/browser/chromeos/login/signed_settings_helper.h" | 10 #include "chrome/browser/chromeos/login/signed_settings_helper.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 | 14 |
| 15 class MockSignedSettingsHelper : public chromeos::SignedSettingsHelper { | 15 class MockSignedSettingsHelper : public chromeos::SignedSettingsHelper { |
| 16 public: | 16 public: |
| 17 MockSignedSettingsHelper(); | 17 MockSignedSettingsHelper(); |
| 18 virtual ~MockSignedSettingsHelper(); | 18 virtual ~MockSignedSettingsHelper(); |
| 19 | 19 |
| 20 MOCK_METHOD3(StartStorePropertyOp, | |
| 21 void(const std::string&, const base::Value&, Callback*)); | |
| 22 MOCK_METHOD2(StartRetrieveProperty, | |
| 23 void(const std::string&, Callback*)); | |
| 24 MOCK_METHOD2(StartStorePolicyOp, | 20 MOCK_METHOD2(StartStorePolicyOp, |
| 25 void(const em::PolicyFetchResponse&, Callback*)); | 21 void(const em::PolicyFetchResponse&, |
| 26 MOCK_METHOD1(StartRetrievePolicyOp, void(Callback* callback)); | 22 SignedSettingsHelper::StorePolicyCallback)); |
| 27 MOCK_METHOD1(CancelCallback, void(Callback*)); | 23 MOCK_METHOD1(StartRetrievePolicyOp, |
| 24 void(SignedSettingsHelper::RetrievePolicyCallback)); |
| 28 | 25 |
| 29 private: | 26 private: |
| 30 DISALLOW_COPY_AND_ASSIGN(MockSignedSettingsHelper); | 27 DISALLOW_COPY_AND_ASSIGN(MockSignedSettingsHelper); |
| 31 }; | 28 }; |
| 32 | 29 |
| 33 ACTION_P(MockSignedSettingsHelperStorePolicy, status_code) { | 30 ACTION_P(MockSignedSettingsHelperStorePolicy, status_code) { |
| 34 arg1->OnStorePolicyCompleted(status_code); | 31 arg1.Run(status_code); |
| 35 } | 32 } |
| 36 | 33 |
| 37 ACTION_P2(MockSignedSettingsHelperRetrievePolicy, status_code, policy) { | 34 ACTION_P2(MockSignedSettingsHelperRetrievePolicy, status_code, policy) { |
| 38 arg0->OnRetrievePolicyCompleted(status_code, policy); | 35 arg0.Run(status_code, policy); |
| 39 } | 36 } |
| 40 | 37 |
| 41 } // namespace chromeos | 38 } // namespace chromeos |
| 42 | 39 |
| 43 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ | 40 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ |
| OLD | NEW |