summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-30 07:57:55 +0000
committerkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-30 07:57:55 +0000
commit3e81900e1eb69ad014ef52e13c8e245d4866b82f (patch)
tree1d0ff649003f54dccaf907953cfb19d51dc2004e
parent83213d48871104b5801722dc7b5e04b6301b796d (diff)
downloadchromium_src-3e81900e1eb69ad014ef52e13c8e245d4866b82f.zip
chromium_src-3e81900e1eb69ad014ef52e13c8e245d4866b82f.tar.gz
chromium_src-3e81900e1eb69ad014ef52e13c8e245d4866b82f.tar.bz2
Clean up comments from r134097.
Review URL: http://codereview.chromium.org/10264006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134515 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/extensions/api/extension_action/extension_actions_api.cc4
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc2
-rw-r--r--chrome/common/extensions/extension.cc8
-rw-r--r--chrome/common/extensions/extension.h14
4 files changed, 14 insertions, 14 deletions
diff --git a/chrome/browser/extensions/api/extension_action/extension_actions_api.cc b/chrome/browser/extensions/api/extension_action/extension_actions_api.cc
index a6c6a4b..0cabc9e 100644
--- a/chrome/browser/extensions/api/extension_action/extension_actions_api.cc
+++ b/chrome/browser/extensions/api/extension_action/extension_actions_api.cc
@@ -146,7 +146,7 @@ bool ExtensionActionFunction::ParseCSSColorString(
bool ExtensionActionFunction::SetVisible(bool visible) {
// If --browser-actions-for-all is enabled there will be a browser_action
- // here instead of a page action. Until we decide to do with that, just
+ // here instead of a page action. Until we decide what to do with that, just
// ignore.
if (!GetExtension()->page_action())
return true;
@@ -176,7 +176,7 @@ bool ExtensionActionSetIconFunction::RunExtensionAction() {
IPC::ReadParam(&bitmap_pickle, &iter, &bitmap));
extension_action_->SetIcon(tab_id_, bitmap);
} else if (details_->GetInteger("iconIndex", &icon_index)) {
- // If --browser-actions-for-all is enabled there might legimitely be an
+ // If --browser-actions-for-all is enabled there might legitimately be an
// iconIndex set. Until we decide what to do with that, ignore.
if (!GetExtension()->page_action())
return true;
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index 86448a9..193a596 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -682,7 +682,7 @@ void ExtensionBrowserEventRouter::ExtensionActionExecuted(
return;
const char* event_name = NULL;
- switch (extension->extension_action_api_type()) {
+ switch (extension->declared_action_type()) {
case ExtensionAction::TYPE_NONE:
break;
case ExtensionAction::TYPE_BROWSER:
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index adbaa0a..da655ed 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -2304,12 +2304,12 @@ bool Extension::LoadPageAction(string16* error) {
page_action_ = LoadExtensionActionHelper(page_action_value, error);
if (!page_action_.get())
return false; // Failed to parse page action definition.
- extension_action_api_type_ = ExtensionAction::TYPE_PAGE;
+ declared_action_type_ = ExtensionAction::TYPE_PAGE;
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableBrowserActionsForAll)) {
browser_action_ = page_action_.Pass();
- // extension_action_api_type_ stays the same; that's the point.
+ // declared_action_type_ stays the same; that's the point.
}
}
@@ -2328,7 +2328,7 @@ bool Extension::LoadBrowserAction(string16* error) {
browser_action_ = LoadExtensionActionHelper(browser_action_value, error);
if (!browser_action_.get())
return false; // Failed to parse browser action definition.
- extension_action_api_type_ = ExtensionAction::TYPE_BROWSER;
+ declared_action_type_ = ExtensionAction::TYPE_BROWSER;
return true;
}
@@ -2826,7 +2826,7 @@ Extension::Extension(const FilePath& path,
incognito_split_mode_(false),
offline_enabled_(false),
converted_from_user_script_(false),
- extension_action_api_type_(ExtensionAction::TYPE_NONE),
+ declared_action_type_(ExtensionAction::TYPE_NONE),
background_page_is_persistent_(true),
allow_background_js_access_(true),
manifest_(manifest.release()),
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index e38ba6f..5d3623f 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -577,8 +577,8 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
const UserScriptList& content_scripts() const { return content_scripts_; }
ExtensionAction* page_action() const { return page_action_.get(); }
ExtensionAction* browser_action() const { return browser_action_.get(); }
- ExtensionAction::Type extension_action_api_type() const {
- return extension_action_api_type_;
+ ExtensionAction::Type declared_action_type() const {
+ return declared_action_type_;
}
const FileBrowserHandlerList* file_browser_handlers() const {
return file_browser_handlers_.get();
@@ -932,11 +932,11 @@ class Extension : public base::RefCountedThreadSafe<Extension> {
// The extension's browser action, if any.
scoped_ptr<ExtensionAction> browser_action_;
- // The "API type" of whichever extension action (|page_action_| or
- // |browser_action_|) refers to. This flag is needed by code which must deal
- // with browser actions that were automatically converted from page actions,
- // since the extensions will still call the pageAction APIs.
- ExtensionAction::Type extension_action_api_type_;
+ // Indicates the type of action (browser or page) that the extension declared
+ // in its manifest. This doesn't imply any value for page_action or
+ // browser_action, since page actions may be turned into browser actions and
+ // browser actions may be generated without any action declared.
+ ExtensionAction::Type declared_action_type_;
// The extension's file browser actions, if any.
scoped_ptr<FileBrowserHandlerList> file_browser_handlers_;