Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
index 1922b4c8e0693a01c290b52703d57877849bf0c5..741fa4d0c313bf21be74c147f3597c05ba347252 100644 |
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
@@ -595,7 +595,9 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
} |
virtual bool GetCellularCarrierInfo(std::string* carrier_id, |
- std::string* topup_url) OVERRIDE { |
+ std::string* topup_url, |
+ std::string* setup_url) OVERRIDE { |
+ bool result = false; |
NetworkLibrary* crosnet = CrosLibrary::Get()->GetNetworkLibrary(); |
const NetworkDevice* cellular = crosnet->FindCellularDevice(); |
if (cellular) { |
@@ -605,15 +607,26 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
const MobileConfig::Carrier* carrier = config->GetCarrier(*carrier_id); |
if (carrier) { |
*topup_url = carrier->top_up_url(); |
- return true; |
+ result = true; |
+ } |
+ const MobileConfig::LocaleConfig* locale_config = |
+ config->GetLocaleConfig(); |
+ if (locale_config) { |
+ // Only link to setup URL if SIM card is not inserted. |
+ if (cellular->technology_family() == TECHNOLOGY_FAMILY_GSM && |
Nikita (slow)
2012/04/24 10:41:50
Based on http://code.google.com/p/chromium-os/issu
|
+ !cellular->is_sim_locked() && |
+ cellular->imsi().empty()) { |
+ *setup_url = locale_config->setup_url(); |
+ result = true; |
+ } |
} |
} |
} |
- return false; |
+ return result; |
} |
- virtual void ShowCellularTopupURL(const std::string& topup_url) OVERRIDE { |
- GetAppropriateBrowser()->ShowSingletonTab(GURL(topup_url)); |
+ virtual void ShowCellularURL(const std::string& url) OVERRIDE { |
+ GetAppropriateBrowser()->ShowSingletonTab(GURL(url)); |
} |
virtual void ChangeProxySettings() OVERRIDE { |