OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/ash/system_tray_client.h" | 5 #include "chrome/browser/ui/ash/system_tray_client.h" |
6 | 6 |
7 #include "ash/login_status.h" | 7 #include "ash/login_status.h" |
8 #include "ash/public/cpp/shell_window_ids.h" | 8 #include "ash/public/cpp/shell_window_ids.h" |
9 #include "ash/public/interfaces/constants.mojom.h" | 9 #include "ash/public/interfaces/constants.mojom.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 408 |
409 void SystemTrayClient::ShowNetworkSettingsHelper(const std::string& network_id, | 409 void SystemTrayClient::ShowNetworkSettingsHelper(const std::string& network_id, |
410 bool show_configure) { | 410 bool show_configure) { |
411 if (!LoginState::Get()->IsUserLoggedIn() || | 411 if (!LoginState::Get()->IsUserLoggedIn() || |
412 session_manager::SessionManager::Get()->IsInSecondaryLoginScreen()) { | 412 session_manager::SessionManager::Get()->IsInSecondaryLoginScreen()) { |
413 return; | 413 return; |
414 } | 414 } |
415 | 415 |
416 std::string page = chrome::kInternetSubPage; | 416 std::string page = chrome::kInternetSubPage; |
417 if (!network_id.empty()) { | 417 if (!network_id.empty()) { |
418 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings)) | 418 page = chrome::kNetworkDetailSubPage; |
419 page = chrome::kNetworkDetailSubPage; | 419 page += "?guid="; |
420 page += "?guid=" + net::EscapeUrlEncodedData(network_id, true); | 420 page += net::EscapeUrlEncodedData(network_id, true); |
421 if (show_configure) | 421 if (show_configure) |
422 page += "&showConfigure=true"; | 422 page += "&showConfigure=true"; |
423 } | 423 } |
424 base::RecordAction(base::UserMetricsAction("OpenInternetOptionsDialog")); | 424 base::RecordAction(base::UserMetricsAction("OpenInternetOptionsDialog")); |
425 ShowSettingsSubPageForActiveUser(page); | 425 ShowSettingsSubPageForActiveUser(page); |
426 } | 426 } |
427 | 427 |
428 void SystemTrayClient::ShowProxySettings() { | 428 void SystemTrayClient::ShowProxySettings() { |
429 LoginState* login_state = LoginState::Get(); | 429 LoginState* login_state = LoginState::Get(); |
430 // User is not logged in. | 430 // User is not logged in. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 if (enterprise_domain == last_enterprise_domain_ && | 514 if (enterprise_domain == last_enterprise_domain_ && |
515 active_directory_managed == last_active_directory_managed_) { | 515 active_directory_managed == last_active_directory_managed_) { |
516 return; | 516 return; |
517 } | 517 } |
518 // Send to ash, which will add an item to the system tray. | 518 // Send to ash, which will add an item to the system tray. |
519 system_tray_->SetEnterpriseDomain(enterprise_domain, | 519 system_tray_->SetEnterpriseDomain(enterprise_domain, |
520 active_directory_managed); | 520 active_directory_managed); |
521 last_enterprise_domain_ = enterprise_domain; | 521 last_enterprise_domain_ = enterprise_domain; |
522 last_active_directory_managed_ = active_directory_managed; | 522 last_active_directory_managed_ = active_directory_managed; |
523 } | 523 } |
OLD | NEW |