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

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

Issue 7633046: Fix VPN icon issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mock expectations. Created 9 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
« no previous file with comments | « chrome/browser/chromeos/status/network_menu.cc ('k') | no next file » | 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 fcc4baedefdc231bcb81f8c3afd4196579c32abf..ea3699b7dcce7ee1987f55a100580b3a2484bc22 100644
--- a/chrome/browser/chromeos/status/network_menu_icon.cc
+++ b/chrome/browser/chromeos/status/network_menu_icon.cc
@@ -340,6 +340,13 @@ class NetworkIcon {
} else {
// Use the ethernet icon for VPN when not connected.
icon_ = rb.GetBitmapNamed(IDR_STATUSBAR_WIRED);
+ // We can be connected to a VPN, even when there is no connected
+ // underlying network. In that case, for the status bar, show the
+ // disconencted badge.
+ if (is_status_bar_) {
+ bottom_right_badge_ =
+ rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_DISCONNECTED);
+ }
}
// Overlay the VPN badge.
bottom_left_badge_ = rb.GetBitmapNamed(kVpnBadgeId);
@@ -566,8 +573,8 @@ void NetworkMenuIcon::SetIconAndText(string16* text) {
// Icon + badges.
icon_->SetDirty();
icon_->UpdateIcon(network);
- // Overlay the VPN badge if connected or connecting to a VPN.
- if (cros->virtual_network()) {
+ // Overlay the VPN badge if connecting to a VPN.
+ if (network->type() != TYPE_VPN && cros->virtual_network()) {
const SkBitmap* vpn_badge = rb.GetBitmapNamed(kVpnBadgeId);
if (cros->virtual_network()->connecting()) {
double animation = GetAnimation();
@@ -578,8 +585,6 @@ void NetworkMenuIcon::SetIconAndText(string16* text) {
vpn_connecting_badge_ = SkBitmapOperations::CreateBlendedBitmap(
empty_vpn_badge_, *vpn_badge, animation);
icon_->set_bottom_left_badge(&vpn_connecting_badge_);
- } else if (cros->virtual_network()->connected()) {
- icon_->set_bottom_left_badge(vpn_badge);
}
}
if (!animating)
« no previous file with comments | « chrome/browser/chromeos/status/network_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698