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

Unified Diff: chrome/browser/ui/ash/system_tray_client.cc

Issue 2430003002: NetworkConnect::Delegate: service_path -> network_id (Closed)
Patch Set: 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
Index: chrome/browser/ui/ash/system_tray_client.cc
diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc
index 516cb0c383ff3aaaca1fb7c2158fbf99151b3416..492a9d66258aecd14f20535d971f977e4ec0ad5e 100644
--- a/chrome/browser/ui/ash/system_tray_client.cc
+++ b/chrome/browser/ui/ash/system_tray_client.cc
@@ -23,6 +23,9 @@
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/login/login_state.h"
+#include "chromeos/network/network_handler.h"
+#include "chromeos/network/network_state.h"
+#include "chromeos/network/network_state_handler.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/common/service_manager_connection.h"
#include "net/base/escape.h"
@@ -141,13 +144,21 @@ void SystemTrayClient::ShowPublicAccountInfo() {
chrome::ShowPolicy(displayer.browser());
}
-void SystemTrayClient::ShowNetworkConfigure(const std::string& service_path) {
+void SystemTrayClient::ShowNetworkConfigure(const std::string& network_id) {
// TODO(jamescook): Consolidate this with the classic ash version from
// NetworkConnectDelegateChromeOS. This will require moving the window
// container calculation to this class, then plumbing a container ID through
// the dialog code.
CHECK(chrome::IsRunningInMash());
- chromeos::NetworkConfigView::Show(service_path, nullptr /* parent */);
+ const chromeos::NetworkState* network =
+ chromeos::NetworkHandler::Get()
+ ->network_state_handler()
+ ->GetNetworkStateFromGuid(network_id);
+ if (!network) {
+ LOG(ERROR) << "Network ID not found: " << network_id;
+ return;
+ }
+ chromeos::NetworkConfigView::Show(network->path(), nullptr /* parent */);
}
void SystemTrayClient::ShowNetworkSettings(const std::string& network_id) {

Powered by Google App Engine
This is Rietveld 408576698