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

Unified Diff: components/crx_file/id_util.h

Issue 481433005: Extensions: Move id_util functions to crx_file component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert last patchset. function returns Extension* and can't use an assert. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/crx_file/DEPS ('k') | components/crx_file/id_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crx_file/id_util.h
diff --git a/extensions/common/id_util.h b/components/crx_file/id_util.h
similarity index 70%
rename from extensions/common/id_util.h
rename to components/crx_file/id_util.h
index 74e690dbf6012133b4261771da8cd2c4d87995c5..674fe6cb4f809a59122db051d743cae07cc9118b 100644
--- a/extensions/common/id_util.h
+++ b/components/crx_file/id_util.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef EXTENSIONS_COMMON_ID_UTIL_H_
-#define EXTENSIONS_COMMON_ID_UTIL_H_
+#ifndef COMPONENTS_CRX_FILE_ID_UTIL_H_
+#define COMPONENTS_CRX_FILE_ID_UTIL_H_
#include <string>
@@ -11,7 +11,7 @@ namespace base {
class FilePath;
}
-namespace extensions {
+namespace crx_file {
namespace id_util {
// The number of bytes in a legal id.
@@ -29,7 +29,11 @@ std::string GenerateIdForPath(const base::FilePath& path);
// sure the drive letter is uppercase.
base::FilePath MaybeNormalizePath(const base::FilePath& path);
+// Checks if |id| is a valid extension-id. Extension-ids are used for anything
+// that comes in a CRX file, including apps, extensions, and components.
+bool IdIsValid(const std::string& id);
+
} // namespace id_util
-} // namespace extensions
+} // namespace crx_file
-#endif // EXTENSIONS_COMMON_ID_UTIL_H_
+#endif // COMPONENTS_CRX_FILE_ID_UTIL_H_
« no previous file with comments | « components/crx_file/DEPS ('k') | components/crx_file/id_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698