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