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

Unified Diff: chrome/common/extensions/api/omnibox/omnibox_handler.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/omnibox/omnibox_handler.cc
diff --git a/chrome/common/extensions/api/omnibox/omnibox_handler.cc b/chrome/common/extensions/api/omnibox/omnibox_handler.cc
index 287021dd2134f6b0af607fce27752eb430bffe7d..32c406991e3719110f2ed4aefba2dc14c154a98b 100644
--- a/chrome/common/extensions/api/omnibox/omnibox_handler.cc
+++ b/chrome/common/extensions/api/omnibox/omnibox_handler.cc
@@ -12,6 +12,7 @@
#include "chrome/common/extensions/api/extension_action/action_info.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "chrome/common/extensions/manifest.h"
namespace extensions {
@@ -44,12 +45,11 @@ OmniboxHandler::OmniboxHandler() {
OmniboxHandler::~OmniboxHandler() {
}
-bool OmniboxHandler::Parse(const base::Value* value,
- Extension* extension,
- string16* error) {
+bool OmniboxHandler::Parse(Extension* extension, string16* error) {
scoped_ptr<OmniboxInfo> info(new OmniboxInfo);
const DictionaryValue* dict = NULL;
- if (!value->GetAsDictionary(&dict) ||
+ if (!extension->manifest()->GetDictionary(extension_manifest_keys::kOmnibox,
+ &dict) ||
!dict->GetString(kKeyword, &info->keyword) ||
info->keyword.empty()) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidOmniboxKeyword);

Powered by Google App Engine
This is Rietveld 408576698