| 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 |
| 11 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 #include "base/values.h" | 14 #include "base/values.h" |
| 15 #include "base/version.h" | 15 #include "base/version.h" |
| 16 #include "chrome/browser/extensions/user_script_master.h" | 16 #include "chrome/browser/extensions/user_script_master.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 | 18 |
| 19 // The URL schemes Chromium extensions and user scripts are served from. These | |
| 20 // really should be in extension_protocols.h, but that causes link errors on | |
| 21 // linux because extension_protocols.cc refers to undefined symbols. | |
| 22 // TODO(aa): Move these back to extension_protocols.h when more of Linux and | |
| 23 // Mac are up and running. | |
| 24 extern const char kExtensionURLScheme[]; | |
| 25 extern const char kUserScriptURLScheme[]; | |
| 26 | |
| 27 // Represents a Chromium extension. | 19 // Represents a Chromium extension. |
| 28 class Extension { | 20 class Extension { |
| 29 public: | 21 public: |
| 30 Extension() {} | 22 Extension() {} |
| 31 explicit Extension(const FilePath& path); | 23 explicit Extension(const FilePath& path); |
| 32 | 24 |
| 33 // The format for extension manifests that this code understands. | 25 // The format for extension manifests that this code understands. |
| 34 static const unsigned int kExpectedFormatVersion = 1; | 26 static const unsigned int kExpectedFormatVersion = 1; |
| 35 | 27 |
| 36 // The name of the manifest inside an extension. | 28 // The name of the manifest inside an extension. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 146 |
| 155 // A SHA1 hash of the contents of the zip file. Note that this key is only | 147 // A SHA1 hash of the contents of the zip file. Note that this key is only |
| 156 // present in the manifest that's prepended to the zip. The inner manifest | 148 // present in the manifest that's prepended to the zip. The inner manifest |
| 157 // will not have this key. | 149 // will not have this key. |
| 158 std::string zip_hash_; | 150 std::string zip_hash_; |
| 159 | 151 |
| 160 DISALLOW_COPY_AND_ASSIGN(Extension); | 152 DISALLOW_COPY_AND_ASSIGN(Extension); |
| 161 }; | 153 }; |
| 162 | 154 |
| 163 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ | 155 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ |
| OLD | NEW |