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

Side by Side Diff: components/policy/core/common/async_policy_provider_unittest.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 12 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "components/policy/core/common/async_policy_provider.h" 5 #include "components/policy/core/common/async_policy_provider.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 MockPolicyLoader::~MockPolicyLoader() {} 66 MockPolicyLoader::~MockPolicyLoader() {}
67 67
68 scoped_ptr<PolicyBundle> MockPolicyLoader::Load() { 68 scoped_ptr<PolicyBundle> MockPolicyLoader::Load() {
69 scoped_ptr<PolicyBundle> bundle; 69 scoped_ptr<PolicyBundle> bundle;
70 const PolicyBundle* loaded = MockLoad(); 70 const PolicyBundle* loaded = MockLoad();
71 if (loaded) { 71 if (loaded) {
72 bundle.reset(new PolicyBundle()); 72 bundle.reset(new PolicyBundle());
73 bundle->CopyFrom(*loaded); 73 bundle->CopyFrom(*loaded);
74 } 74 }
75 return bundle.Pass(); 75 return bundle;
76 } 76 }
77 77
78 } // namespace 78 } // namespace
79 79
80 class AsyncPolicyProviderTest : public testing::Test { 80 class AsyncPolicyProviderTest : public testing::Test {
81 protected: 81 protected:
82 AsyncPolicyProviderTest(); 82 AsyncPolicyProviderTest();
83 ~AsyncPolicyProviderTest() override; 83 ~AsyncPolicyProviderTest() override;
84 84
85 void SetUp() override; 85 void SetUp() override;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0); 220 EXPECT_CALL(observer, OnUpdatePolicy(provider_.get())).Times(0);
221 provider_->Shutdown(); 221 provider_->Shutdown();
222 loop_.RunUntilIdle(); 222 loop_.RunUntilIdle();
223 Mock::VerifyAndClearExpectations(&observer); 223 Mock::VerifyAndClearExpectations(&observer);
224 224
225 provider_->RemoveObserver(&observer); 225 provider_->RemoveObserver(&observer);
226 provider_.reset(); 226 provider_.reset();
227 } 227 }
228 228
229 } // namespace policy 229 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/common/async_policy_provider.cc ('k') | components/policy/core/common/cloud/cloud_policy_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698