| Index: chrome/browser/policy/asynchronous_policy_test_base.h
|
| diff --git a/chrome/browser/policy/asynchronous_policy_test_base.h b/chrome/browser/policy/asynchronous_policy_test_base.h
|
| index 887f21da8796541db5a7b3ec8ea43741e45a15b3..1a0a8b399327172e364b337d5b276ade9179a5af 100644
|
| --- a/chrome/browser/policy/asynchronous_policy_test_base.h
|
| +++ b/chrome/browser/policy/asynchronous_policy_test_base.h
|
| @@ -16,7 +16,7 @@
|
|
|
| namespace policy {
|
|
|
| -class PolicyMap;
|
| +class PolicyBundle;
|
|
|
| // A delegate for testing that can feed arbitrary information to the loader.
|
| class ProviderDelegateMock : public AsynchronousPolicyProvider::Delegate {
|
| @@ -24,7 +24,16 @@ class ProviderDelegateMock : public AsynchronousPolicyProvider::Delegate {
|
| ProviderDelegateMock();
|
| virtual ~ProviderDelegateMock();
|
|
|
| - MOCK_METHOD0(Load, PolicyMap*());
|
| + // Load() returns a scoped_ptr<PolicyBundle> but it can't be mocked because
|
| + // scoped_ptr is moveable but not copyable. This override forwards the
|
| + // call to MockLoad() which returns a PolicyBundle*, and returns it wrapped
|
| + // in a passed scoped_ptr.
|
| + virtual scoped_ptr<PolicyBundle> Load() OVERRIDE {
|
| + scoped_ptr<PolicyBundle> bundle(MockLoad());
|
| + return bundle.Pass();
|
| + }
|
| +
|
| + MOCK_METHOD0(MockLoad, PolicyBundle*());
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(ProviderDelegateMock);
|
|
|