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

Side by Side Diff: components/policy/core/common/cloud/component_cloud_policy_updater.cc

Issue 108563005: Move the cloud policy protobufs into the component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/cloud/component_cloud_policy_updater.h" 5 #include "components/policy/core/common/cloud/component_cloud_policy_updater.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h"
13 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h"
14 #include "components/policy/core/common/cloud/component_cloud_policy_store.h" 12 #include "components/policy/core/common/cloud/component_cloud_policy_store.h"
15 #include "components/policy/core/common/cloud/external_policy_data_fetcher.h" 13 #include "components/policy/core/common/cloud/external_policy_data_fetcher.h"
14 #include "policy/proto/chrome_extension_policy.pb.h"
15 #include "policy/proto/device_management_backend.pb.h"
16 16
17 namespace em = enterprise_management; 17 namespace em = enterprise_management;
18 18
19 namespace policy { 19 namespace policy {
20 20
21 namespace { 21 namespace {
22 22
23 // The maximum size of the serialized policy protobuf. 23 // The maximum size of the serialized policy protobuf.
24 const size_t kPolicyProtoMaxSize = 16 * 1024; 24 const size_t kPolicyProtoMaxSize = 16 * 1024;
25 25
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 std::string ComponentCloudPolicyUpdater::NamespaceToKey( 102 std::string ComponentCloudPolicyUpdater::NamespaceToKey(
103 const PolicyNamespace& ns) { 103 const PolicyNamespace& ns) {
104 const std::string domain = base::IntToString(ns.domain); 104 const std::string domain = base::IntToString(ns.domain);
105 const std::string size = base::IntToString(domain.size()); 105 const std::string size = base::IntToString(domain.size());
106 return size + ":" + domain + ":" + ns.component_id; 106 return size + ":" + domain + ":" + ns.component_id;
107 } 107 }
108 108
109 } // namespace policy 109 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698