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

Side by Side Diff: components/policy/core/browser/url_blacklist_policy_handler.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 4 years, 12 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/url_blacklist_policy_handler.h" 5 #include "components/policy/core/browser/url_blacklist_policy_handler.h"
6 6
7 #include <utility>
8
7 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_value_map.h" 10 #include "base/prefs/pref_value_map.h"
9 #include "base/values.h" 11 #include "base/values.h"
10 #include "components/policy/core/browser/policy_error_map.h" 12 #include "components/policy/core/browser/policy_error_map.h"
11 #include "components/policy/core/common/policy_map.h" 13 #include "components/policy/core/common/policy_map.h"
12 #include "components/policy/core/common/policy_pref_names.h" 14 #include "components/policy/core/common/policy_pref_names.h"
13 #include "grit/components_strings.h" 15 #include "grit/components_strings.h"
14 #include "policy/policy_constants.h" 16 #include "policy/policy_constants.h"
15 17
16 namespace policy { 18 namespace policy {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 72
71 if (url_blacklist) { 73 if (url_blacklist) {
72 for (base::ListValue::const_iterator entry(url_blacklist->begin()); 74 for (base::ListValue::const_iterator entry(url_blacklist->begin());
73 entry != url_blacklist->end(); ++entry) { 75 entry != url_blacklist->end(); ++entry) {
74 if ((*entry)->IsType(base::Value::TYPE_STRING)) 76 if ((*entry)->IsType(base::Value::TYPE_STRING))
75 merged_url_blacklist->Append((*entry)->CreateDeepCopy()); 77 merged_url_blacklist->Append((*entry)->CreateDeepCopy());
76 } 78 }
77 } 79 }
78 80
79 if (disabled_schemes || url_blacklist) { 81 if (disabled_schemes || url_blacklist) {
80 prefs->SetValue(policy_prefs::kUrlBlacklist, merged_url_blacklist.Pass()); 82 prefs->SetValue(policy_prefs::kUrlBlacklist,
83 std::move(merged_url_blacklist));
81 } 84 }
82 } 85 }
83 86
84 } // namespace policy 87 } // namespace policy
OLDNEW
« no previous file with comments | « components/policy/core/browser/url_blacklist_manager_unittest.cc ('k') | components/policy/core/common/async_policy_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698