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

Side by Side Diff: chrome/browser/policy/cloud/user_cloud_policy_store_base.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/policy/cloud/user_cloud_policy_store_base.h" 5 #include "chrome/browser/policy/cloud/user_cloud_policy_store_base.h"
6 6
7 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h" 7 #include "components/policy/core/common/cloud/cloud_external_data_manager.h"
8 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" 8 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
9 #include "components/policy/core/common/policy_map.h" 9 #include "components/policy/core/common/policy_map.h"
10 #include "policy/proto/cloud_policy.pb.h" 10 #include "policy/proto/cloud_policy.pb.h"
11 11
12 namespace policy { 12 namespace policy {
13 13
14 // Decodes a CloudPolicySettings object into a policy map. The implementation is 14 // Decodes a CloudPolicySettings object into a policy map. The implementation is
15 // generated code in policy/cloud_policy_generated.cc. 15 // generated code in policy/cloud_policy_generated.cc.
16 void DecodePolicy(const enterprise_management::CloudPolicySettings& policy, 16 void DecodePolicy(const enterprise_management::CloudPolicySettings& policy,
17 base::WeakPtr<CloudExternalDataManager> external_data_manager, 17 base::WeakPtr<CloudExternalDataManager> external_data_manager,
18 PolicyMap* policies); 18 PolicyMap* policies);
(...skipping 23 matching lines...) Expand all
42 void UserCloudPolicyStoreBase::InstallPolicy( 42 void UserCloudPolicyStoreBase::InstallPolicy(
43 scoped_ptr<enterprise_management::PolicyData> policy_data, 43 scoped_ptr<enterprise_management::PolicyData> policy_data,
44 scoped_ptr<enterprise_management::CloudPolicySettings> payload) { 44 scoped_ptr<enterprise_management::CloudPolicySettings> payload) {
45 // Decode the payload. 45 // Decode the payload.
46 policy_map_.Clear(); 46 policy_map_.Clear();
47 DecodePolicy(*payload, external_data_manager(), &policy_map_); 47 DecodePolicy(*payload, external_data_manager(), &policy_map_);
48 policy_ = policy_data.Pass(); 48 policy_ = policy_data.Pass();
49 } 49 }
50 50
51 } // namespace policy 51 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698