Index: chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc |
diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc |
index 9fed8fc7ef4f25e103125d2e8274337839867a64..69abbabe5dd9bfe87b32883eebbe32a5be887435 100644 |
--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc |
+++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc |
@@ -562,8 +562,9 @@ void LocalDiscoveryUIHandler::PrivetClientToV3( |
void LocalDiscoveryUIHandler::CheckUserLoggedIn() { |
base::FundamentalValue logged_in_value(!GetSyncAccount().empty()); |
- web_ui()->CallJavascriptFunction("local_discovery.setUserLoggedIn", |
- logged_in_value); |
+ base::FundamentalValue is_supervised_value(IsUserSupervisedOrOffTheRecord()); |
+ web_ui()->CallJavascriptFunction( |
+ "local_discovery.setUserLoggedIn", logged_in_value, is_supervised_value); |
} |
void LocalDiscoveryUIHandler::CheckListingDone() { |
@@ -634,6 +635,12 @@ void LocalDiscoveryUIHandler::CreatePrivetV3Client( |
privet_resolution_->Start(); |
} |
+bool LocalDiscoveryUIHandler::IsUserSupervisedOrOffTheRecord() { |
+ Profile* profile = Profile::FromWebUI(web_ui()); |
+ |
+ return profile->IsSupervised() || profile->IsOffTheRecord(); |
+} |
+ |
#if defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE) |
void LocalDiscoveryUIHandler::StartCloudPrintConnector() { |
Profile* profile = Profile::FromWebUI(web_ui()); |