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

Unified Diff: extensions/common/file_util.h

Issue 229813002: Move extensions manifest IconsHandler to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments (icons-handler) Created 6 years, 8 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 | « chrome/renderer/extensions/resource_request_policy.cc ('k') | extensions/common/file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/common/file_util.h
diff --git a/extensions/common/file_util.h b/extensions/common/file_util.h
index 3113745986ad3ea0a683f8c96ae7b4df42ca30ca..770dd750b12cb21a1eda0173893f69b8776804f0 100644
--- a/extensions/common/file_util.h
+++ b/extensions/common/file_util.h
@@ -5,10 +5,10 @@
#ifndef EXTENSIONS_COMMON_FILE_UTIL_H_
#define EXTENSIONS_COMMON_FILE_UTIL_H_
+#include <map>
#include <string>
-#include "extensions/common/message_bundle.h"
-
+class ExtensionIconSet;
class GURL;
namespace base {
@@ -16,6 +16,9 @@ class FilePath;
}
namespace extensions {
+class Extension;
+class MessageBundle;
+
namespace file_util {
// Get a relative file path from a chrome-extension:// URL.
@@ -26,6 +29,13 @@ base::FilePath ExtensionURLToRelativeFilePath(const GURL& url);
base::FilePath ExtensionResourceURLToFilePath(const GURL& url,
const base::FilePath& root);
+// Returns true if the icons in the icon set exist. Oherwise, populates
+// |error| with the |error_message_id| for an invalid file.
+bool ValidateExtensionIconSet(const ExtensionIconSet& icon_set,
+ const Extension* extension,
+ int error_message_id,
+ std::string* error);
+
// Loads extension message catalogs and returns message bundle.
// Returns NULL on error or if the extension is not localized.
MessageBundle* LoadMessageBundle(const base::FilePath& extension_path,
@@ -34,7 +44,7 @@ MessageBundle* LoadMessageBundle(const base::FilePath& extension_path,
// Loads the extension message bundle substitution map. Contains at least
// the extension_id item.
-MessageBundle::SubstitutionMap* LoadMessageBundleSubstitutionMap(
+std::map<std::string, std::string>* LoadMessageBundleSubstitutionMap(
const base::FilePath& extension_path,
const std::string& extension_id,
const std::string& default_locale);
« no previous file with comments | « chrome/renderer/extensions/resource_request_policy.cc ('k') | extensions/common/file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698