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

Side by Side Diff: components/policy/core/common/schema_registry_tracking_policy_provider.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/schema_registry_tracking_policy_provider .h" 5 #include "components/policy/core/common/schema_registry_tracking_policy_provider .h"
6 6
7 #include <utility>
8
7 #include "components/policy/core/common/schema_map.h" 9 #include "components/policy/core/common/schema_map.h"
8 #include "components/policy/core/common/schema_registry.h" 10 #include "components/policy/core/common/schema_registry.h"
9 11
10 namespace policy { 12 namespace policy {
11 13
12 SchemaRegistryTrackingPolicyProvider::SchemaRegistryTrackingPolicyProvider( 14 SchemaRegistryTrackingPolicyProvider::SchemaRegistryTrackingPolicyProvider(
13 ConfigurationPolicyProvider* delegate) 15 ConfigurationPolicyProvider* delegate)
14 : delegate_(delegate), state_(WAITING_FOR_REGISTRY_READY) { 16 : delegate_(delegate), state_(WAITING_FOR_REGISTRY_READY) {
15 delegate_->AddObserver(this); 17 delegate_->AddObserver(this);
16 // Serve the initial |delegate_| policies. 18 // Serve the initial |delegate_| policies.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (state_ == READY) { 86 if (state_ == READY) {
85 bundle->CopyFrom(delegate_->policies()); 87 bundle->CopyFrom(delegate_->policies());
86 schema_map()->FilterBundle(bundle.get()); 88 schema_map()->FilterBundle(bundle.get());
87 } else { 89 } else {
88 // Always pass on the Chrome policy, even if the components are not ready 90 // Always pass on the Chrome policy, even if the components are not ready
89 // yet. 91 // yet.
90 const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, ""); 92 const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, "");
91 bundle->Get(chrome_ns).CopyFrom(delegate_->policies().Get(chrome_ns)); 93 bundle->Get(chrome_ns).CopyFrom(delegate_->policies().Get(chrome_ns));
92 } 94 }
93 95
94 UpdatePolicy(bundle.Pass()); 96 UpdatePolicy(std::move(bundle));
95 } 97 }
96 98
97 } // namespace policy 99 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698