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

Side by Side Diff: chrome/browser/extensions/policy_handlers.h

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef CHROME_BROWSER_EXTENSIONS_POLICY_HANDLERS_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_POLICY_HANDLERS_H_
6 #define CHROME_BROWSER_EXTENSIONS_POLICY_HANDLERS_H_ 6 #define CHROME_BROWSER_EXTENSIONS_POLICY_HANDLERS_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "components/policy/core/browser/configuration_policy_handler.h" 12 #include "components/policy/core/browser/configuration_policy_handler.h"
12 13
13 namespace policy { 14 namespace policy {
14 class PolicyMap; 15 class PolicyMap;
15 class PolicyErrorMap; 16 class PolicyErrorMap;
16 class Schema; 17 class Schema;
17 } // namespace policy 18 } // namespace policy
18 19
19 namespace extensions { 20 namespace extensions {
(...skipping 12 matching lines...) Expand all
32 policy::PolicyErrorMap* errors) override; 33 policy::PolicyErrorMap* errors) override;
33 void ApplyPolicySettings(const policy::PolicyMap& policies, 34 void ApplyPolicySettings(const policy::PolicyMap& policies,
34 PrefValueMap* prefs) override; 35 PrefValueMap* prefs) override;
35 36
36 protected: 37 protected:
37 const char* pref_path() const; 38 const char* pref_path() const;
38 39
39 // Runs sanity checks on the policy value and returns it in |extension_ids|. 40 // Runs sanity checks on the policy value and returns it in |extension_ids|.
40 bool CheckAndGetList(const policy::PolicyMap& policies, 41 bool CheckAndGetList(const policy::PolicyMap& policies,
41 policy::PolicyErrorMap* errors, 42 policy::PolicyErrorMap* errors,
42 scoped_ptr<base::ListValue>* extension_ids); 43 std::unique_ptr<base::ListValue>* extension_ids);
43 44
44 private: 45 private:
45 const char* pref_path_; 46 const char* pref_path_;
46 bool allow_wildcards_; 47 bool allow_wildcards_;
47 48
48 DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler); 49 DISALLOW_COPY_AND_ASSIGN(ExtensionListPolicyHandler);
49 }; 50 };
50 51
51 class ExtensionInstallForcelistPolicyHandler 52 class ExtensionInstallForcelistPolicyHandler
52 : public policy::TypeCheckingPolicyHandler { 53 : public policy::TypeCheckingPolicyHandler {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 void ApplyPolicySettings(const policy::PolicyMap& policies, 103 void ApplyPolicySettings(const policy::PolicyMap& policies,
103 PrefValueMap* prefs) override; 104 PrefValueMap* prefs) override;
104 105
105 private: 106 private:
106 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsPolicyHandler); 107 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsPolicyHandler);
107 }; 108 };
108 109
109 } // namespace extensions 110 } // namespace extensions
110 111
111 #endif // CHROME_BROWSER_EXTENSIONS_POLICY_HANDLERS_H_ 112 #endif // CHROME_BROWSER_EXTENSIONS_POLICY_HANDLERS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/permissions_updater_unittest.cc ('k') | chrome/browser/extensions/policy_handlers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698