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

Unified Diff: ash/system/network/tray_network.cc

Issue 10383255: Crash fix for system tray. We try to enable proxy settings entry even while there are created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/network/tray_network.cc
diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc
index 1a02308b129ddad630a305a30b52f9e7a8929bb5..95e588ea584402e113d41cd5a3003f7c0b09cf22 100644
--- a/ash/system/network/tray_network.cc
+++ b/ash/system/network/tray_network.cc
@@ -242,7 +242,8 @@ class NetworkDetailedView : public TrayDetailsView,
button_wifi_->SetToggled(!delegate->GetWifiEnabled());
button_mobile_->SetToggled(!delegate->GetMobileEnabled());
button_mobile_->SetVisible(delegate->GetMobileAvailable());
- proxy_settings_->SetEnabled(delegate->IsNetworkConnected());
+ if (proxy_settings_)
+ proxy_settings_->SetEnabled(delegate->IsNetworkConnected());
}
void AppendNetworkEntries() {
@@ -335,6 +336,7 @@ class NetworkDetailedView : public TrayDetailsView,
bottom_row->AddTextButton(other_mobile_);
CreateSettingsEntry();
+ DCHECK(settings_ || proxy_settings_);
bottom_row->AddTextButton(settings_ ? settings_ : proxy_settings_);
AddChildView(bottom_row);
« 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