| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_MANIFEST_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // Returns all known keys (this is used for testing). | 54 // Returns all known keys (this is used for testing). |
| 55 static std::set<std::string> GetAllKnownKeys(); | 55 static std::set<std::string> GetAllKnownKeys(); |
| 56 | 56 |
| 57 // Takes over ownership of |value|. | 57 // Takes over ownership of |value|. |
| 58 explicit Manifest(base::DictionaryValue* value); | 58 explicit Manifest(base::DictionaryValue* value); |
| 59 virtual ~Manifest(); | 59 virtual ~Manifest(); |
| 60 | 60 |
| 61 // Returns true if all keys in the manifest can be specified by | 61 // Returns true if all keys in the manifest can be specified by |
| 62 // the extension type. | 62 // the extension type. |
| 63 bool ValidateManifest(std::string* error) const; | 63 bool ValidateManifest(string16* error) const; |
| 64 | 64 |
| 65 // Returns the manifest type. | 65 // Returns the manifest type. |
| 66 Type GetType() const; | 66 Type GetType() const; |
| 67 | 67 |
| 68 // Returns true if the manifest represents an Extension::TYPE_THEME. | 68 // Returns true if the manifest represents an Extension::TYPE_THEME. |
| 69 bool IsTheme() const; | 69 bool IsTheme() const; |
| 70 | 70 |
| 71 // Returns true for Extension::TYPE_PLATFORM_APP | 71 // Returns true for Extension::TYPE_PLATFORM_APP |
| 72 bool IsPlatformApp() const; | 72 bool IsPlatformApp() const; |
| 73 | 73 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 103 private: | 103 private: |
| 104 // Returns true if the extension can specify the given |path|. | 104 // Returns true if the extension can specify the given |path|. |
| 105 bool CanAccessPath(const std::string& path) const; | 105 bool CanAccessPath(const std::string& path) const; |
| 106 | 106 |
| 107 scoped_ptr<base::DictionaryValue> value_; | 107 scoped_ptr<base::DictionaryValue> value_; |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 } // namespace extensions | 110 } // namespace extensions |
| 111 | 111 |
| 112 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_ | 112 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_H_ |
| OLD | NEW |