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

Side by Side Diff: chrome/browser/chromeos/arc/arc_policy_bridge.cc

Issue 2418833003: Remove use of deprecated base::ListValue::Append(Value*) overload in //chrome/browser/chromeos (Closed)
Patch Set: use-after-move Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/device_local_account_management_policy_provider_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chromeos/arc/arc_policy_bridge.h" 5 #include "chrome/browser/chromeos/arc/arc_policy_bridge.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 continue; 167 continue;
168 168
169 std::string x509_data; 169 std::string x509_data;
170 if (!certificate->GetStringWithoutPathExpansion(::onc::certificate::kX509, 170 if (!certificate->GetStringWithoutPathExpansion(::onc::certificate::kX509,
171 &x509_data)) { 171 &x509_data)) {
172 continue; 172 continue;
173 } 173 }
174 174
175 base::DictionaryValue data; 175 base::DictionaryValue data;
176 data.SetString("X509", x509_data); 176 data.SetString("X509", x509_data);
177 ca_certs->Append(data.DeepCopy()); 177 ca_certs->Append(data.CreateDeepCopy());
178 } 178 }
179 filtered_policies->Set(kArcCaCerts, std::move(ca_certs)); 179 filtered_policies->Set(kArcCaCerts, std::move(ca_certs));
180 } 180 }
181 181
182 std::string GetFilteredJSONPolicies(const policy::PolicyMap& policy_map) { 182 std::string GetFilteredJSONPolicies(const policy::PolicyMap& policy_map) {
183 base::DictionaryValue filtered_policies; 183 base::DictionaryValue filtered_policies;
184 // Parse ArcPolicy as JSON string before adding other policies to the 184 // Parse ArcPolicy as JSON string before adding other policies to the
185 // dictionary. 185 // dictionary.
186 const base::Value* const app_policy_value = 186 const base::Value* const app_policy_value =
187 policy_map.GetValue(policy::key::kArcPolicy); 187 policy_map.GetValue(policy::key::kArcPolicy);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 user_manager::UserManager::Get()->GetPrimaryUser(); 309 user_manager::UserManager::Get()->GetPrimaryUser();
310 Profile* const profile = 310 Profile* const profile =
311 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user); 311 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user);
312 auto* profile_policy_connector = 312 auto* profile_policy_connector =
313 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile); 313 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile);
314 policy_service_ = profile_policy_connector->policy_service(); 314 policy_service_ = profile_policy_connector->policy_service();
315 is_managed_ = profile_policy_connector->IsManaged(); 315 is_managed_ = profile_policy_connector->IsManaged();
316 } 316 }
317 317
318 } // namespace arc 318 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/device_local_account_management_policy_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698