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

Unified Diff: components/policy/core/common/cloud/policy_header_service_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 5 years 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 side-by-side diff with in-line comments
Download patch
Index: components/policy/core/common/cloud/policy_header_service_unittest.cc
diff --git a/components/policy/core/common/cloud/policy_header_service_unittest.cc b/components/policy/core/common/cloud/policy_header_service_unittest.cc
index 90c5c4ba0391f2fdb2894a2d7706e1b28619e358..54d2aba0ec4fde853d9a53d96b25023dc3022593 100644
--- a/components/policy/core/common/cloud/policy_header_service_unittest.cc
+++ b/components/policy/core/common/cloud/policy_header_service_unittest.cc
@@ -2,6 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/policy/core/common/cloud/policy_header_service.h"
+
+#include <utility>
+
#include "base/base64.h"
#include "base/json/json_reader.h"
#include "base/memory/scoped_ptr.h"
@@ -10,7 +14,6 @@
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_store.h"
#include "components/policy/core/common/cloud/policy_header_io_helper.h"
-#include "components/policy/core/common/cloud/policy_header_service.h"
#include "net/http/http_request_headers.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_test_util.h"
@@ -26,7 +29,7 @@ const char kPolicyHeaderName[] = "Chrome-Policy-Posture";
class TestCloudPolicyStore : public MockCloudPolicyStore {
public:
void SetPolicy(scoped_ptr<PolicyData> policy) {
- policy_ = policy.Pass();
+ policy_ = std::move(policy);
// Notify observers.
NotifyStoreLoaded();
}
@@ -44,7 +47,7 @@ class PolicyHeaderServiceTest : public testing::Test {
kPolicyVerificationKeyHash,
&user_store_,
&device_store_));
- helper_ = service_->CreatePolicyHeaderIOHelper(task_runner_).Pass();
+ helper_ = service_->CreatePolicyHeaderIOHelper(task_runner_);
}
void TearDown() override {
@@ -104,7 +107,7 @@ TEST_F(PolicyHeaderServiceTest, TestWithAndWithoutPolicyHeader) {
std::string expected_policy_token = "expected_dmtoken";
policy->set_request_token(expected_dmtoken);
policy->set_policy_token(expected_policy_token);
- user_store_.SetPolicy(policy.Pass());
+ user_store_.SetPolicy(std::move(policy));
task_runner_->RunUntilIdle();
net::TestURLRequestContext context;

Powered by Google App Engine
This is Rietveld 408576698