Commit 3c3a6f79 authored by stevenjb@google.com's avatar stevenjb@google.com

Don't show wifi lock icon in the status bar.

BUG=chromium-os:18769
TEST=Lock icon for wifi should not be visible in the bottom-right corner in the status bar, but should still be visible in the menu and the network settings page. (See issue).

Review URL: http://codereview.chromium.org/7637007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96578 0039d316-1c4b-4281-b951-d872f2087c98
parent 94e77c30
...@@ -170,6 +170,7 @@ const SkBitmap* BadgeForNetworkTechnology(const CellularNetwork* cellular) { ...@@ -170,6 +170,7 @@ const SkBitmap* BadgeForNetworkTechnology(const CellularNetwork* cellular) {
// Sets up and generates an SkBitmap for a Network icon. // Sets up and generates an SkBitmap for a Network icon.
class NetworkIcon { class NetworkIcon {
public: public:
// Default constructor is used by the status bar icon (NetworkMenuIcon).
NetworkIcon() NetworkIcon()
: state_(STATE_UNKNOWN), : state_(STATE_UNKNOWN),
strength_index_(-1), strength_index_(-1),
...@@ -177,9 +178,11 @@ class NetworkIcon { ...@@ -177,9 +178,11 @@ class NetworkIcon {
top_left_badge_(NULL), top_left_badge_(NULL),
top_right_badge_(NULL), top_right_badge_(NULL),
bottom_left_badge_(NULL), bottom_left_badge_(NULL),
bottom_right_badge_(NULL) { bottom_right_badge_(NULL),
is_status_bar_(true) {
} }
// Service path constructor for cached network service icons.
explicit NetworkIcon(const std::string& service_path) explicit NetworkIcon(const std::string& service_path)
: service_path_(service_path), : service_path_(service_path),
state_(STATE_UNKNOWN), state_(STATE_UNKNOWN),
...@@ -188,7 +191,8 @@ class NetworkIcon { ...@@ -188,7 +191,8 @@ class NetworkIcon {
top_left_badge_(NULL), top_left_badge_(NULL),
top_right_badge_(NULL), top_right_badge_(NULL),
bottom_left_badge_(NULL), bottom_left_badge_(NULL),
bottom_right_badge_(NULL) { bottom_right_badge_(NULL),
is_status_bar_(false) {
} }
~NetworkIcon() { ~NetworkIcon() {
...@@ -299,7 +303,7 @@ class NetworkIcon { ...@@ -299,7 +303,7 @@ class NetworkIcon {
case TYPE_WIFI: { case TYPE_WIFI: {
const WifiNetwork* wifi = const WifiNetwork* wifi =
static_cast<const WifiNetwork*>(network); static_cast<const WifiNetwork*>(network);
if (wifi->encrypted()) if (wifi->encrypted() && !is_status_bar_)
bottom_right_badge_ = rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_SECURE); bottom_right_badge_ = rb.GetBitmapNamed(IDR_STATUSBAR_NETWORK_SECURE);
break; break;
} }
...@@ -399,6 +403,7 @@ class NetworkIcon { ...@@ -399,6 +403,7 @@ class NetworkIcon {
const SkBitmap* top_right_badge_; const SkBitmap* top_right_badge_;
const SkBitmap* bottom_left_badge_; const SkBitmap* bottom_left_badge_;
const SkBitmap* bottom_right_badge_; const SkBitmap* bottom_right_badge_;
bool is_status_bar_;
DISALLOW_COPY_AND_ASSIGN(NetworkIcon); DISALLOW_COPY_AND_ASSIGN(NetworkIcon);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment