OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/browser/android/policy_converter.h" | 5 #include "components/policy/core/browser/android/policy_converter.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 bool PolicyConverter::Register(JNIEnv* env) { | 188 bool PolicyConverter::Register(JNIEnv* env) { |
189 return RegisterNativesImpl(env); | 189 return RegisterNativesImpl(env); |
190 } | 190 } |
191 | 191 |
192 void PolicyConverter::SetPolicyValue(const std::string& key, | 192 void PolicyConverter::SetPolicyValue(const std::string& key, |
193 std::unique_ptr<base::Value> value) { | 193 std::unique_ptr<base::Value> value) { |
194 const Schema schema = policy_schema_->GetKnownProperty(key); | 194 const Schema schema = policy_schema_->GetKnownProperty(key); |
195 const PolicyNamespace ns(POLICY_DOMAIN_CHROME, std::string()); | 195 const PolicyNamespace ns(POLICY_DOMAIN_CHROME, std::string()); |
196 policy_bundle_->Get(ns).Set( | 196 policy_bundle_->Get(ns).Set( |
197 key, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM, | 197 key, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, POLICY_SOURCE_PLATFORM, |
198 ConvertValueToSchema(std::move(value), schema).release(), nullptr); | 198 ConvertValueToSchema(std::move(value), schema), nullptr); |
199 } | 199 } |
200 | 200 |
201 } // namespace android | 201 } // namespace android |
202 } // namespace policy | 202 } // namespace policy |
OLD | NEW |