| OLD | NEW | 
|   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 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDLER_
    H_ |   5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDLER_
    H_ | 
|   6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDLER_
    H_ |   6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDLER_
    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 }  // namespace policy |  17 }  // namespace policy | 
|  17  |  18  | 
|  18 namespace extensions { |  19 namespace extensions { | 
|  19  |  20  | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
|  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(NativeMessagingHostListPolicyHandler); |  49   DISALLOW_COPY_AND_ASSIGN(NativeMessagingHostListPolicyHandler); | 
|  49 }; |  50 }; | 
|  50  |  51  | 
|  51 }  // namespace extensions |  52 }  // namespace extensions | 
|  52  |  53  | 
|  53 #endif  // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDL
    ER_H_ |  54 #endif  // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_POLICY_HANDL
    ER_H_ | 
| OLD | NEW |