Chromium Code Reviews| 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 + "?guid=" + net::EscapeUrlEncodedData( network_id, true); |
|
dpapad
2017/06/01 00:12:54
Nit: This seems more than 80 columns.
Dan Beam
2017/06/03 00:11:02
Done.
| |
| 419 page = chrome::kNetworkDetailSubPage; | |
| 420 page += "?guid=" + net::EscapeUrlEncodedData(network_id, true); | |
| 421 if (show_configure) | 419 if (show_configure) |
| 422 page += "&showConfigure=true"; | 420 page += "&showConfigure=true"; |
| 423 } | 421 } |
| 424 base::RecordAction(base::UserMetricsAction("OpenInternetOptionsDialog")); | 422 base::RecordAction(base::UserMetricsAction("OpenInternetOptionsDialog")); |
| 425 ShowSettingsSubPageForActiveUser(page); | 423 ShowSettingsSubPageForActiveUser(page); |
| 426 } | 424 } |
| 427 | 425 |
| 428 void SystemTrayClient::ShowProxySettings() { | 426 void SystemTrayClient::ShowProxySettings() { |
| 429 LoginState* login_state = LoginState::Get(); | 427 LoginState* login_state = LoginState::Get(); |
| 430 // User is not logged in. | 428 // 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_ && | 512 if (enterprise_domain == last_enterprise_domain_ && |
| 515 active_directory_managed == last_active_directory_managed_) { | 513 active_directory_managed == last_active_directory_managed_) { |
| 516 return; | 514 return; |
| 517 } | 515 } |
| 518 // Send to ash, which will add an item to the system tray. | 516 // Send to ash, which will add an item to the system tray. |
| 519 system_tray_->SetEnterpriseDomain(enterprise_domain, | 517 system_tray_->SetEnterpriseDomain(enterprise_domain, |
| 520 active_directory_managed); | 518 active_directory_managed); |
| 521 last_enterprise_domain_ = enterprise_domain; | 519 last_enterprise_domain_ = enterprise_domain; |
| 522 last_active_directory_managed_ = active_directory_managed; | 520 last_active_directory_managed_ = active_directory_managed; |
| 523 } | 521 } |
| OLD | NEW |