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

Unified Diff: chrome/browser/chromeos/status/network_menu_icon.cc

Issue 8547005: CrOs: Remove 2 static initializers and 2 exit time destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 1 month 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
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/status/network_menu_icon.cc
diff --git a/chrome/browser/chromeos/status/network_menu_icon.cc b/chrome/browser/chromeos/status/network_menu_icon.cc
index 43b66fde3023edeb83a3807fc1369e54b1931421..09afcbf2378361672a0fc6a58a174ba176f49341 100644
--- a/chrome/browser/chromeos/status/network_menu_icon.cc
+++ b/chrome/browser/chromeos/status/network_menu_icon.cc
@@ -32,11 +32,11 @@ const int kThrobDurationMs = 750;
// Network strength bars images.
const int kNumBarsImages = 5;
-SkBitmap kBarsImagesAnimating[kNumBarsImages - 1];
+SkBitmap* kBarsImagesAnimating[kNumBarsImages - 1];
// Network strength arcs images.
const int kNumArcsImages = 5;
-SkBitmap kArcsImagesAnimating[kNumArcsImages - 1];
+SkBitmap* kArcsImagesAnimating[kNumArcsImages - 1];
// Badge offsets. If a badge is large enough that it won't fit within the icon
// when using the right or bottom offset, it gets shifted inwards so it will.
@@ -526,7 +526,7 @@ void NetworkMenuIcon::SetConnectingIcon(const Network* network,
double animation) {
int image_count;
BitmapType bitmap_type;
- SkBitmap* images;
+ SkBitmap** images;
if (network->type() == TYPE_WIFI) {
image_count = kNumArcsImages - 1;
@@ -542,11 +542,12 @@ void NetworkMenuIcon::SetConnectingIcon(const Network* network,
index = max(min(index, image_count - 1), 0);
// Lazily cache images.
- if (images[index].empty()) {
+ if (!images[index]) {
SkBitmap source = GetBitmap(bitmap_type, index + 1);
- images[index] = NetworkMenuIcon::GenerateConnectingBitmap(source);
+ images[index] =
+ new SkBitmap(NetworkMenuIcon::GenerateConnectingBitmap(source));
}
- icon_->set_icon(images[index]);
+ icon_->set_icon(*images[index]);
}
// Sets up the icon and badges for GenerateBitmap().
« no previous file with comments | « no previous file | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698