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

Side by Side Diff: components/policy/core/browser/android/policy_converter.cc

Issue 1350913006: Revert of Add source column to chrome://policy showing the origins of policies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 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
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,
194 ConvertValueToSchema(value.Pass(), schema).release(), nullptr); 193 ConvertValueToSchema(value.Pass(), schema).release(), nullptr);
195 } 194 }
196 195
197 } // namespace android 196 } // namespace android
198 } // namespace policy 197 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/policy_ui_browsertest.cc ('k') | components/policy/core/browser/autofill_policy_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698