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

Unified Diff: chrome/browser/extensions/extension_action_manager.cc

Issue 502033003: Move ExtensionActionStorageManager out of extension_action_api.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master for CQ Created 6 years, 4 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/browser/extensions/extension_action_manager.cc
diff --git a/chrome/browser/extensions/extension_action_manager.cc b/chrome/browser/extensions/extension_action_manager.cc
index ec26eb4c011eb38d9e11f2147abe998eee783630..125021af31aef9fa4812f993451e53fe8be5452e 100644
--- a/chrome/browser/extensions/extension_action_manager.cc
+++ b/chrome/browser/extensions/extension_action_manager.cc
@@ -89,9 +89,6 @@ namespace {
// key of |extension|'s manifest.
void PopulateMissingValues(const Extension& extension,
ExtensionAction* action) {
- const int* kIconSizes = extension_misc::kExtensionActionIconSizes;
- const size_t kNumIconSizes = extension_misc::kNumExtensionActionIconSizes;
-
// If the title is missing from |action|, set it to |extension|'s name.
if (action->GetTitle(ExtensionAction::kDefaultTabId).empty())
action->SetTitle(ExtensionAction::kDefaultTabId, extension.name());
@@ -111,8 +108,9 @@ void PopulateMissingValues(const Extension& extension,
// Replace any missing extension action icons with the largest icon
// retrieved from |extension|'s manifest so long as the largest icon is
// larger than the current key.
- for (int i = kNumIconSizes - 1; i >= 0; --i) {
- int size = kIconSizes[i];
+ for (int i = extension_misc::kNumExtensionActionIconSizes - 1;
+ i >= 0; --i) {
+ int size = extension_misc::kExtensionActionIconSizes[i].size;
if (default_icon->Get(size, ExtensionIconSet::MATCH_BIGGER).empty()
&& largest_icon_size > size) {
default_icon->Add(size, largest_icon);
« no previous file with comments | « chrome/browser/extensions/extension_action.cc ('k') | chrome/browser/extensions/extension_action_storage_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698