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

Unified Diff: chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc

Issue 23712002: Cleanup network type matching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test in Debug. Created 7 years, 3 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
Index: chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
index 9fd266cd0747b79acaa4382ec29cb70a46042eb6..835d5022e220766449b975a5ef053f1b5991f677 100644
--- a/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/sim_unlock_ui.cc
@@ -25,6 +25,7 @@
#include "chromeos/network/network_event_log.h"
#include "chromeos/network/network_state_handler.h"
#include "chromeos/network/network_state_handler_observer.h"
+#include "chromeos/network/shill_property_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/url_data_source.h"
@@ -363,8 +364,9 @@ SimUnlockHandler::SimUnlockHandler()
dialog_mode_(SimDialogDelegate::SIM_DIALOG_UNLOCK),
pending_pin_operation_(false),
weak_ptr_factory_(this) {
- if (GetNetworkStateHandler()->GetTechnologyState(flimflam::kTypeCellular)
- != NetworkStateHandler::TECHNOLOGY_UNAVAILABLE)
+ if (GetNetworkStateHandler()
+ ->GetTechnologyState(NetworkTypePattern::Cellular()) !=
+ NetworkStateHandler::TECHNOLOGY_UNAVAILABLE)
GetNetworkStateHandler()->AddObserver(this, FROM_HERE);
}
@@ -706,8 +708,9 @@ void SimUnlockHandler::InitializeSimStatus() {
// TODO(armansito): For now, we're initializing the device path to the first
// available cellular device. We should try to obtain a specific device here,
// as there can be multiple cellular devices present.
- const DeviceState* cellular_device = GetNetworkStateHandler()->
- GetDeviceStateByType(flimflam::kTypeCellular);
+ const DeviceState* cellular_device =
+ GetNetworkStateHandler()
+ ->GetDeviceStateByType(NetworkTypePattern::Cellular());
if (cellular_device) {
cellular_device_path_ = cellular_device->path();
sim_lock_type_ = cellular_device->sim_lock_type();
« no previous file with comments | « chrome/browser/ui/webui/chromeos/choose_mobile_network_ui.cc ('k') | chrome/browser/ui/webui/help/help_utils_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698