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

Unified Diff: chrome/common/extensions/api/extension_action/browser_action_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/extension_action/browser_action_handler.cc
diff --git a/chrome/common/extensions/api/extension_action/browser_action_handler.cc b/chrome/common/extensions/api/extension_action/browser_action_handler.cc
index 45ec18851194f194ced3e9caf64d5092546605ae..b5ab1db916337419011c11c27bf0bb6f4d639e54 100644
--- a/chrome/common/extensions/api/extension_action/browser_action_handler.cc
+++ b/chrome/common/extensions/api/extension_action/browser_action_handler.cc
@@ -11,6 +11,7 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/feature_switch.h"
+#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/manifest_handler_helpers.h"
namespace extensions {
@@ -21,11 +22,11 @@ BrowserActionHandler::BrowserActionHandler() {
BrowserActionHandler::~BrowserActionHandler() {
}
-bool BrowserActionHandler::Parse(const base::Value* value,
- Extension* extension,
+bool BrowserActionHandler::Parse(Extension* extension,
string16* error) {
const DictionaryValue* dict = NULL;
- if (!value->GetAsDictionary(&dict)) {
+ if (!extension->manifest()->GetDictionary(
+ extension_manifest_keys::kBrowserAction, &dict)) {
*error = ASCIIToUTF16(extension_manifest_errors::kInvalidBrowserAction);
return false;
}

Powered by Google App Engine
This is Rietveld 408576698