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 <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 bool PolicyConverter::Register(JNIEnv* env) { | 183 bool PolicyConverter::Register(JNIEnv* env) { |
184 return RegisterNativesImpl(env); | 184 return RegisterNativesImpl(env); |
185 } | 185 } |
186 | 186 |
187 void PolicyConverter::SetPolicyValue(const std::string& key, | 187 void PolicyConverter::SetPolicyValue(const std::string& key, |
188 scoped_ptr<base::Value> value) { | 188 scoped_ptr<base::Value> value) { |
189 const Schema schema = policy_schema_->GetKnownProperty(key); | 189 const Schema schema = policy_schema_->GetKnownProperty(key); |
190 const PolicyNamespace ns(POLICY_DOMAIN_CHROME, std::string()); | 190 const PolicyNamespace ns(POLICY_DOMAIN_CHROME, std::string()); |
191 policy_bundle_->Get(ns) | 191 policy_bundle_->Get(ns) |
192 .Set(key, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, | 192 .Set(key, POLICY_LEVEL_MANDATORY, POLICY_SCOPE_MACHINE, |
| 193 POLICY_SOURCE_PLATFORM, |
193 ConvertValueToSchema(value.Pass(), schema).release(), nullptr); | 194 ConvertValueToSchema(value.Pass(), schema).release(), nullptr); |
194 } | 195 } |
195 | 196 |
196 } // namespace android | 197 } // namespace android |
197 } // namespace policy | 198 } // namespace policy |
OLD | NEW |