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

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

Issue 2430003002: NetworkConnect::Delegate: service_path -> network_id (Closed)
Patch Set: Rebase Created 4 years, 2 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 | « chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h ('k') | ui/chromeos/network/network_connect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
diff --git a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
index 6ebd799261d5f78cac1ee48f7fd0ff608049e6bd..da85adea8f4998543f231dc40dd9c775c52b4c30 100644
--- a/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
+++ b/chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
@@ -18,6 +18,8 @@
#include "chrome/browser/ui/simple_message_box.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
+#include "chromeos/network/network_state.h"
+#include "chromeos/network/network_state_handler.h"
#include "content/public/browser/browser_thread.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/geometry/size.h"
@@ -64,9 +66,17 @@ class MobileSetupDialogDelegate : public WebDialogDelegate {
};
// static
-void MobileSetupDialog::Show(const std::string& service_path) {
+void MobileSetupDialog::ShowByNetworkId(const std::string& network_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- MobileSetupDialogDelegate::GetInstance()->ShowDialog(service_path);
+ const chromeos::NetworkState* network =
+ chromeos::NetworkHandler::Get()
+ ->network_state_handler()
+ ->GetNetworkStateFromGuid(network_id);
+ if (!network) {
+ LOG(ERROR) << "MobileSetupDialog: Network ID not found: " << network_id;
+ return;
+ }
+ MobileSetupDialogDelegate::GetInstance()->ShowDialog(network->path());
}
// static
« no previous file with comments | « chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h ('k') | ui/chromeos/network/network_connect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698