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

Side by Side Diff: chrome/browser/extensions/extension_management_test_util.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes 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 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 "chrome/browser/extensions/extension_management_test_util.h" 5 #include "chrome/browser/extensions/extension_management_test_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "components/crx_file/id_util.h" 9 #include "components/crx_file/id_util.h"
10 #include "components/policy/core/common/configuration_policy_provider.h" 10 #include "components/policy/core/common/configuration_policy_provider.h"
11 #include "components/policy/core/common/mock_configuration_policy_provider.h" 11 #include "components/policy/core/common/mock_configuration_policy_provider.h"
12 #include "components/policy/core/common/policy_bundle.h" 12 #include "components/policy/core/common/policy_bundle.h"
13 #include "components/policy/core/common/policy_map.h" 13 #include "components/policy/core/common/policy_map.h"
14 #include "components/policy/core/common/policy_namespace.h" 14 #include "components/policy/core/common/policy_namespace.h"
15 #include "components/policy/core/common/policy_types.h" 15 #include "components/policy/core/common/policy_types.h"
16 #include "policy/policy_constants.h" 16 #include "policy/policy_constants.h"
17 17
18 namespace extensions { 18 namespace extensions {
19 19
20 namespace schema = schema_constants; 20 namespace schema = schema_constants;
21 21
22 namespace { 22 namespace {
23 23
24 const char kInstallSourcesPath[] = "*.install_sources"; 24 const char kInstallSourcesPath[] = "*.install_sources";
25 const char kAllowedTypesPath[] = "*.allowed_types"; 25 const char kAllowedTypesPath[] = "*.allowed_types";
26 26
27 std::string make_path(std::string a, std::string b) { 27 std::string make_path(const std::string& a, const std::string& b) {
28 return a + "." + b; 28 return a + "." + b;
29 } 29 }
30 30
31 } // namespace 31 } // namespace
32 32
33 ExtensionManagementPrefUpdaterBase::ExtensionManagementPrefUpdaterBase() { 33 ExtensionManagementPrefUpdaterBase::ExtensionManagementPrefUpdaterBase() {
34 } 34 }
35 35
36 ExtensionManagementPrefUpdaterBase::~ExtensionManagementPrefUpdaterBase() { 36 ExtensionManagementPrefUpdaterBase::~ExtensionManagementPrefUpdaterBase() {
37 } 37 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 ExtensionManagementPolicyUpdater::~ExtensionManagementPolicyUpdater() { 262 ExtensionManagementPolicyUpdater::~ExtensionManagementPolicyUpdater() {
263 policies_->Get(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, 263 policies_->Get(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME,
264 std::string())) 264 std::string()))
265 .Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY, 265 .Set(policy::key::kExtensionSettings, policy::POLICY_LEVEL_MANDATORY,
266 policy::POLICY_SCOPE_USER, TakePref().release(), nullptr); 266 policy::POLICY_SCOPE_USER, TakePref().release(), nullptr);
267 provider_->UpdatePolicy(policies_.Pass()); 267 provider_->UpdatePolicy(policies_.Pass());
268 } 268 }
269 269
270 } // namespace extensions 270 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698