OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_EXTENSION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 static const char* kInvalidMatchCountError; | 58 static const char* kInvalidMatchCountError; |
59 static const char* kInvalidMatchError; | 59 static const char* kInvalidMatchError; |
60 static const char* kInvalidMatchesError; | 60 static const char* kInvalidMatchesError; |
61 static const char* kInvalidNameError; | 61 static const char* kInvalidNameError; |
62 static const char* kInvalidRunAtError; | 62 static const char* kInvalidRunAtError; |
63 static const char* kInvalidVersionError; | 63 static const char* kInvalidVersionError; |
64 static const char* kInvalidZipHashError; | 64 static const char* kInvalidZipHashError; |
65 static const char* kInvalidPluginsDirError; | 65 static const char* kInvalidPluginsDirError; |
66 | 66 |
67 // The number of bytes in a legal id. | 67 // The number of bytes in a legal id. |
68 static const int kIdSize; | 68 static const size_t kIdSize; |
69 | 69 |
70 // Creates an absolute url to a resource inside an extension. The | 70 // Creates an absolute url to a resource inside an extension. The |
71 // |extension_url| argument should be the url() from an Extension object. The | 71 // |extension_url| argument should be the url() from an Extension object. The |
72 // |relative_path| can be untrusted user input. The returned URL will either | 72 // |relative_path| can be untrusted user input. The returned URL will either |
73 // be invalid() or a child of |extension_url|. | 73 // be invalid() or a child of |extension_url|. |
74 // NOTE: Static so that it can be used from multiple threads. | 74 // NOTE: Static so that it can be used from multiple threads. |
75 static GURL GetResourceURL(const GURL& extension_url, | 75 static GURL GetResourceURL(const GURL& extension_url, |
76 const std::string& relative_path); | 76 const std::string& relative_path); |
77 | 77 |
78 // Creates an absolute path to a resource inside an extension. The | 78 // Creates an absolute path to a resource inside an extension. The |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 // A SHA1 hash of the contents of the zip file. Note that this key is only | 150 // A SHA1 hash of the contents of the zip file. Note that this key is only |
151 // present in the manifest that's prepended to the zip. The inner manifest | 151 // present in the manifest that's prepended to the zip. The inner manifest |
152 // will not have this key. | 152 // will not have this key. |
153 std::string zip_hash_; | 153 std::string zip_hash_; |
154 | 154 |
155 DISALLOW_COPY_AND_ASSIGN(Extension); | 155 DISALLOW_COPY_AND_ASSIGN(Extension); |
156 }; | 156 }; |
157 | 157 |
158 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ | 158 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |