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

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

Issue 1940153002: Use std::unique_ptr to express ownership of base::Value in PolicyMap::Entry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another-fix Created 4 years, 7 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 (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_store.h" 5 #include "components/policy/core/common/cloud/component_cloud_policy_store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 std::string level_string; 353 std::string level_string;
354 if (description->GetStringWithoutPathExpansion(kLevel, &level_string) && 354 if (description->GetStringWithoutPathExpansion(kLevel, &level_string) &&
355 level_string == kRecommended) { 355 level_string == kRecommended) {
356 level = POLICY_LEVEL_RECOMMENDED; 356 level = POLICY_LEVEL_RECOMMENDED;
357 } 357 }
358 358
359 // If policy for components is ever used for device-level settings then 359 // If policy for components is ever used for device-level settings then
360 // this must support a configurable scope; assuming POLICY_SCOPE_USER is 360 // this must support a configurable scope; assuming POLICY_SCOPE_USER is
361 // fine for now. 361 // fine for now.
362 policy->Set(it.key(), level, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD, 362 policy->Set(it.key(), level, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
363 value.release(), nullptr); 363 std::move(value), nullptr);
364 } 364 }
365 365
366 return true; 366 return true;
367 } 367 }
368 368
369 } // namespace policy 369 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698