| Index: chrome/browser/chromeos/sms_observer.cc
|
| diff --git a/chrome/browser/chromeos/sms_observer.cc b/chrome/browser/chromeos/sms_observer.cc
|
| index 3bbb4b1c288d5829713fe334dc1c4ec9fdff902d..f3dd5c6c1de7250bbfc1d7d74c73a2f7c782b34a 100644
|
| --- a/chrome/browser/chromeos/sms_observer.cc
|
| +++ b/chrome/browser/chromeos/sms_observer.cc
|
| @@ -18,9 +18,6 @@ namespace chromeos {
|
| SmsObserver::SmsObserver(Profile* profile)
|
| : profile_(profile) {
|
| DCHECK(profile_);
|
| - if (!CrosLibrary::Get()->EnsureLoaded())
|
| - return;
|
| -
|
| UpdateObservers(chromeos::CrosLibrary::Get()->GetNetworkLibrary());
|
| }
|
|
|
| @@ -31,8 +28,8 @@ SmsObserver::~SmsObserver() {
|
| }
|
|
|
| void SmsObserver::UpdateObservers(NetworkLibrary* library) {
|
| - if (!CrosLibrary::Get()->EnsureLoaded() ||
|
| - !CrosLibrary::Get()->GetNetworkLibrary()->IsCros())
|
| + // Guard against calls to libcros (http://crosbug.com/17863).
|
| + if (!CrosLibrary::Get()->libcros_loaded())
|
| return;
|
|
|
| const CellularNetworkVector& networks = library->cellular_networks();
|
| @@ -78,8 +75,8 @@ void SmsObserver::UpdateObservers(NetworkLibrary* library) {
|
| }
|
|
|
| void SmsObserver::DisconnectAll() {
|
| - if (!CrosLibrary::Get()->EnsureLoaded() ||
|
| - !CrosLibrary::Get()->GetNetworkLibrary()->IsCros())
|
| + // Guard against calls to libcros (http://crosbug.com/17863).
|
| + if (!CrosLibrary::Get()->libcros_loaded())
|
| return;
|
|
|
| for (ObserversMap::iterator it = observers_.begin();
|
|
|