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

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

Issue 27236: Enforce new id format (hex str of sha-1) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 | « no previous file | 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
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 static const char* kInvalidManifestError; 57 static const char* kInvalidManifestError;
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.
68 static const int kIdSize;
69
67 // Creates an absolute url to a resource inside an extension. The 70 // Creates an absolute url to a resource inside an extension. The
68 // |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
69 // |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
70 // be invalid() or a child of |extension_url|. 73 // be invalid() or a child of |extension_url|.
71 // NOTE: Static so that it can be used from multiple threads. 74 // NOTE: Static so that it can be used from multiple threads.
72 static GURL GetResourceURL(const GURL& extension_url, 75 static GURL GetResourceURL(const GURL& extension_url,
73 const std::string& relative_path); 76 const std::string& relative_path);
74 77
75 // Creates an absolute path to a resource inside an extension. The 78 // Creates an absolute path to a resource inside an extension. The
76 // |extension_path| argument should be the path() from an Extension object. 79 // |extension_path| argument should be the path() from an Extension object.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 149
147 // 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
148 // 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
149 // will not have this key. 152 // will not have this key.
150 std::string zip_hash_; 153 std::string zip_hash_;
151 154
152 DISALLOW_COPY_AND_ASSIGN(Extension); 155 DISALLOW_COPY_AND_ASSIGN(Extension);
153 }; 156 };
154 157
155 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_ 158 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698