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

Unified Diff: chrome/common/extensions/command.cc

Issue 11662013: Move Commands from Extension to CommandsHandler (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_script_badge
Patch Set: Created 8 years 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/command.cc
diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc
index a581ff80dba6e1fea5ff966e45d08f702c9212e8..97c4c96db7a3d2ae7ca3625ea38f72f056654e52 100644
--- a/chrome/common/extensions/command.cc
+++ b/chrome/common/extensions/command.cc
@@ -202,7 +202,7 @@ ui::Accelerator Command::StringToAccelerator(const std::string& accelerator) {
return parsed;
}
-bool Command::Parse(DictionaryValue* command,
+bool Command::Parse(const base::DictionaryValue* command,
const std::string& command_name,
int index,
string16* error) {
@@ -213,9 +213,9 @@ bool Command::Parse(DictionaryValue* command,
SuggestionMap suggestions;
// First try to parse the |suggested_key| as a dictionary.
- DictionaryValue* suggested_key_dict;
+ const base::DictionaryValue* suggested_key_dict;
if (command->GetDictionary(keys::kSuggestedKey, &suggested_key_dict)) {
- DictionaryValue::key_iterator iter = suggested_key_dict->begin_keys();
+ base::DictionaryValue::key_iterator iter = suggested_key_dict->begin_keys();
for ( ; iter != suggested_key_dict->end_keys(); ++iter) {
// For each item in the dictionary, extract the platforms specified.
std::string suggested_key_string;
@@ -327,9 +327,9 @@ bool Command::Parse(DictionaryValue* command,
return true;
}
-DictionaryValue* Command::ToValue(const Extension* extension,
- bool active) const {
- DictionaryValue* extension_data = new DictionaryValue();
+base::DictionaryValue* Command::ToValue(const Extension* extension,
+ bool active) const {
+ base::DictionaryValue* extension_data = new base::DictionaryValue();
string16 command_description;
if (command_name() == values::kBrowserActionCommandEvent ||

Powered by Google App Engine
This is Rietveld 408576698