| OLD | NEW |
| 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 #ifndef CHROME_COMMON_EXTENSIONS_CSP_HANDLER_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_CSP_HANDLER_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_CSP_HANDLER_H_ | 6 #define CHROME_COMMON_EXTENSIONS_CSP_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 const Extension* extension); | 26 const Extension* extension); |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 // Parses "content_security_policy" and "app.content_security_policy" keys. | 29 // Parses "content_security_policy" and "app.content_security_policy" keys. |
| 30 class CSPHandler : public ManifestHandler { | 30 class CSPHandler : public ManifestHandler { |
| 31 public: | 31 public: |
| 32 explicit CSPHandler(bool is_platform_app); | 32 explicit CSPHandler(bool is_platform_app); |
| 33 virtual ~CSPHandler(); | 33 virtual ~CSPHandler(); |
| 34 | 34 |
| 35 virtual bool Parse(Extension* extension, string16* error) OVERRIDE; | 35 virtual bool Parse(Extension* extension, string16* error) OVERRIDE; |
| 36 virtual bool AlwaysParseForType(Manifest::Type type) OVERRIDE; | 36 virtual bool AlwaysParseForType(Manifest::Type type) const OVERRIDE; |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 virtual const std::vector<std::string> Keys() const OVERRIDE; |
| 40 |
| 39 bool is_platform_app_; | 41 bool is_platform_app_; |
| 40 | 42 |
| 41 DISALLOW_COPY_AND_ASSIGN(CSPHandler); | 43 DISALLOW_COPY_AND_ASSIGN(CSPHandler); |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 } // namespace extensions | 46 } // namespace extensions |
| 45 | 47 |
| 46 #endif // CHROME_COMMON_EXTENSIONS_CSP_HANDLER_H_ | 48 #endif // CHROME_COMMON_EXTENSIONS_CSP_HANDLER_H_ |
| OLD | NEW |