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

Side by Side Diff: chrome/browser/extensions/api/extension_action/extension_action_api.cc

Issue 303393006: ExtensionActionApi: Add missing break statement. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" 5 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 if (dict->GetString(kBadgeTextColorStorageKey, &str_value) && 167 if (dict->GetString(kBadgeTextColorStorageKey, &str_value) &&
168 !action->HasBadgeTextColor(kDefaultTabId)) { 168 !action->HasBadgeTextColor(kDefaultTabId)) {
169 action->SetBadgeTextColor(kDefaultTabId, RawStringToSkColor(str_value)); 169 action->SetBadgeTextColor(kDefaultTabId, RawStringToSkColor(str_value));
170 } 170 }
171 if (dict->GetInteger(kAppearanceStorageKey, &int_value) && 171 if (dict->GetInteger(kAppearanceStorageKey, &int_value) &&
172 !action->HasIsVisible(kDefaultTabId)) { 172 !action->HasIsVisible(kDefaultTabId)) {
173 switch (int_value) { 173 switch (int_value) {
174 case INVISIBLE: 174 case INVISIBLE:
175 case OBSOLETE_WANTS_ATTENTION: 175 case OBSOLETE_WANTS_ATTENTION:
176 action->SetIsVisible(kDefaultTabId, false); 176 action->SetIsVisible(kDefaultTabId, false);
177 break;
177 case ACTIVE: 178 case ACTIVE:
178 action->SetIsVisible(kDefaultTabId, true); 179 action->SetIsVisible(kDefaultTabId, true);
180 break;
179 } 181 }
180 } 182 }
181 183
182 const base::DictionaryValue* icon_value = NULL; 184 const base::DictionaryValue* icon_value = NULL;
183 if (dict->GetDictionary(kIconStorageKey, &icon_value) && 185 if (dict->GetDictionary(kIconStorageKey, &icon_value) &&
184 !action->HasIcon(kDefaultTabId)) { 186 !action->HasIcon(kDefaultTabId)) {
185 for (size_t i = 0; i < arraysize(kIconSizes); i++) { 187 for (size_t i = 0; i < arraysize(kIconSizes); i++) {
186 if (icon_value->GetString(kIconSizes[i].size_string, &str_value) && 188 if (icon_value->GetString(kIconSizes[i].size_string, &str_value) &&
187 StringToSkBitmap(str_value, &bitmap)) { 189 StringToSkBitmap(str_value, &bitmap)) {
188 CHECK(!bitmap.isNull()); 190 CHECK(!bitmap.isNull());
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 return true; 915 return true;
914 } 916 }
915 917
916 bool EnablePageActionsFunction::RunSync() { 918 bool EnablePageActionsFunction::RunSync() {
917 return SetPageActionEnabled(true); 919 return SetPageActionEnabled(true);
918 } 920 }
919 921
920 bool DisablePageActionsFunction::RunSync() { 922 bool DisablePageActionsFunction::RunSync() {
921 return SetPageActionEnabled(false); 923 return SetPageActionEnabled(false);
922 } 924 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698