summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/omnibox/omnibox_handler.cc
diff options
context:
space:
mode:
authoryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-30 00:01:18 +0000
committeryoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-30 00:01:18 +0000
commitce613ba0d5d3bc17cd55d582d4c3ad4667bee57e (patch)
treecb6ba45b8d889ed57152884222586dd4ff47bb72 /chrome/common/extensions/api/omnibox/omnibox_handler.cc
parenta9d2b465d3985155361fbe92cd4e239050b96f05 (diff)
downloadchromium_src-ce613ba0d5d3bc17cd55d582d4c3ad4667bee57e.zip
chromium_src-ce613ba0d5d3bc17cd55d582d4c3ad4667bee57e.tar.gz
chromium_src-ce613ba0d5d3bc17cd55d582d4c3ad4667bee57e.tar.bz2
Change ManifestHandler interface to always (implicitly) pass the entire manifest to handlers.
This makes it possible to support multi-key handlers using the same interface. Fixes a bug with default behavior for manifest handlers; previously, HasNoKey would be called even for inappropriate extension types. BUG=159265 Review URL: https://chromiumcodereview.appspot.com/12084034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/api/omnibox/omnibox_handler.cc')
-rw-r--r--chrome/common/extensions/api/omnibox/omnibox_handler.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/common/extensions/api/omnibox/omnibox_handler.cc b/chrome/common/extensions/api/omnibox/omnibox_handler.cc
index 287021dd..32c4069 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);