Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1241)

Side by Side Diff: chrome/browser/extensions/extension.h

Issue 31008: Coalesce more hardcoded schemes to using predefined constants. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | chrome/browser/extensions/extension.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « chrome/browser/download/save_package.cc ('k') | chrome/browser/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698