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

Unified Diff: chrome/common/extensions/api/file_handlers/file_handlers_parser.cc

Issue 12084034: Change manifest handler interface to always (implicitly) pass the entire manifest to handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tts, TODO Created 7 years, 11 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
Index: chrome/common/extensions/api/file_handlers/file_handlers_parser.cc
diff --git a/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc b/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc
index f7240f98a9dee5d7544bd0b52ee96e2ea39e2d21..84a2bbb87aeca08efb44fbd499c680fece12ce4c 100644
--- a/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc
+++ b/chrome/common/extensions/api/file_handlers/file_handlers_parser.cc
@@ -9,6 +9,7 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "chrome/common/extensions/manifest.h"
#include "extensions/common/error_utils.h"
namespace extensions {
@@ -74,12 +75,11 @@ bool LoadFileHandler(const std::string& handler_id,
return true;
}
-bool FileHandlersParser::Parse(const base::Value* value,
- Extension* extension,
- string16* error) {
+bool FileHandlersParser::Parse(Extension* extension, string16* error) {
scoped_ptr<FileHandlers> info(new FileHandlers);
const DictionaryValue* all_handlers = NULL;
- if (!value->GetAsDictionary(&all_handlers)) {
+ if (!extension->manifest()->GetDictionary(
+ extension_manifest_keys::kFileHandlers, &all_handlers)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidFileHandlers);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698