Chromium Code Reviews| 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..46fb8ec1a91badc2f460cc61881930b3f144c8ef 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,7 @@ SmsObserver::~SmsObserver() { |
| } |
| void SmsObserver::UpdateObservers(NetworkLibrary* library) { |
| - if (!CrosLibrary::Get()->EnsureLoaded() || |
| - !CrosLibrary::Get()->GetNetworkLibrary()->IsCros()) |
| + if (!CrosLibrary::Get()->libcros_loaded()) |
|
satorux1
2011/11/16 23:51:34
This is a valid check. Let's add some comment like
stevenjb
2011/11/17 00:23:33
Done.
|
| return; |
| const CellularNetworkVector& networks = library->cellular_networks(); |
| @@ -78,8 +74,7 @@ void SmsObserver::UpdateObservers(NetworkLibrary* library) { |
| } |
| void SmsObserver::DisconnectAll() { |
| - if (!CrosLibrary::Get()->EnsureLoaded() || |
| - !CrosLibrary::Get()->GetNetworkLibrary()->IsCros()) |
| + if (!CrosLibrary::Get()->libcros_loaded()) |
| return; |
| for (ObserversMap::iterator it = observers_.begin(); |