diff --git a/ash/constants/ash_pref_names.h b/ash/constants/ash_pref_names.h index a81e30538eeef..8c6c578d16394 100644 --- a/ash/constants/ash_pref_names.h +++ b/ash/constants/ash_pref_names.h @@ -26,6 +26,14 @@ inline constexpr char kAssistPredictiveWritingEnabled[] = inline constexpr char kCalendarIntegrationEnabled[] = "ash.calendar_integration_enabled"; +// A boolean pref of whether Google Classroom integration is enabled. +inline constexpr char kClassroomIntegrationEnabled[] = + "ash.classroom_integration_enabled"; + +// A boolean pref of whether Google Tasks integration is enabled. +inline constexpr char kTasksIntegrationEnabled[] = + "ash.tasks_integration_enabled"; + // A boolean pref of whether emoji suggestion is enabled. inline constexpr char kEmojiSuggestionEnabled[] = "assistive_input.emoji_suggestion_enabled"; diff --git a/ash/glanceables/glanceables_controller.cc b/ash/glanceables/glanceables_controller.cc index bf45623d5cd2c..342743843bf12 100644 --- a/ash/glanceables/glanceables_controller.cc +++ b/ash/glanceables/glanceables_controller.cc @@ -32,6 +32,8 @@ GlanceablesController::~GlanceablesController() { void GlanceablesController::RegisterUserProfilePrefs( PrefRegistrySimple* registry) { registry->RegisterBooleanPref(prefs::kGlanceablesEnabled, true); + registry->RegisterBooleanPref(prefs::kClassroomIntegrationEnabled, true); + registry->RegisterBooleanPref(prefs::kTasksIntegrationEnabled, true); ClassroomBubbleStudentView::RegisterUserProfilePrefs(registry); TasksComboboxModel::RegisterUserProfilePrefs(registry); } diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index 39f0ed9509c46..9aefcc02b8108 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc @@ -1644,16 +1644,21 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = { { key::kPageUpAndPageDownKeysModifier, ash::prefs::kPageUpAndPageDownKeysModifier, base::Value::Type::INTEGER }, -{ key::kInsertKeyModifier, + { key::kInsertKeyModifier, ash::prefs::kInsertKeyModifier, base::Value::Type::INTEGER }, - {key::kGoogleLocationServicesEnabled, + { key::kGoogleLocationServicesEnabled, ash::prefs::kUserGeolocationAccessLevel, - base::Value::Type::INTEGER}, + base::Value::Type::INTEGER }, { key::kLocalUserFilesAllowed, prefs::kLocalUserFilesAllowed, - base::Value::Type::BOOLEAN - }, + base::Value::Type::BOOLEAN }, + { key::kClassroomIntegrationEnabled, + ash::prefs::kClassroomIntegrationEnabled, + base::Value::Type::BOOLEAN }, + { key::kTasksIntegrationEnabled, + ash::prefs::kTasksIntegrationEnabled, + base::Value::Type::BOOLEAN }, #endif // BUILDFLAG(IS_CHROMEOS_ASH) #if BUILDFLAG(IS_LINUX) diff --git a/components/policy/resources/templates/policies.yaml b/components/policy/resources/templates/policies.yaml index fbea4a929e9fb..9f3263cce1f85 100644 --- a/components/policy/resources/templates/policies.yaml +++ b/components/policy/resources/templates/policies.yaml @@ -1240,6 +1240,8 @@ policies: 1239: ProfileLabel 1240: PrivacySandboxFingerprintingProtectionEnabled 1241: MultiScreenCaptureAllowedForUrls + 1242: ClassroomIntegrationEnabled + 1243: TasksIntegrationEnabled atomic_groups: 1: Homepage 2: RemoteAccess diff --git a/components/policy/resources/templates/policy_definitions/Miscellaneous/ClassroomIntegrationEnabled.yaml b/components/policy/resources/templates/policy_definitions/Miscellaneous/ClassroomIntegrationEnabled.yaml new file mode 100644 index 0000000000000..36922ea349fea --- /dev/null +++ b/components/policy/resources/templates/policy_definitions/Miscellaneous/ClassroomIntegrationEnabled.yaml @@ -0,0 +1,26 @@ +caption: Enable <ph name="GOOGLE_CLASSROOM_NAME">Google Classroom</ph> integration +default: true +desc: |- + Enables <ph name="GOOGLE_CLASSROOM_NAME">Google Classroom</ph> integration on <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph>. + + If this policy is enabled or left unset, the <ph name="GOOGLE_CLASSROOM_NAME">Google Classroom</ph> integration is enabled for enterprise users. + + If this policy is disabled, the <ph name="GOOGLE_CLASSROOM_NAME">Google Classroom</ph> integration is disabled for enterprise users. +example_value: true +features: + dynamic_refresh: true + per_profile: true +items: +- caption: Enable <ph name="GOOGLE_CLASSROOM_NAME">Google Classroom</ph> integration. + value: true +- caption: Disable <ph name="GOOGLE_CLASSROOM_NAME">Google Classroom</ph> integration. + value: false +owners: +- amitrokhin@google.com +- file://ash/glanceables/OWNERS +schema: + type: boolean +future_on: +- chrome_os +tags: [] +type: main diff --git a/components/policy/resources/templates/policy_definitions/Miscellaneous/TasksIntegrationEnabled.yaml b/components/policy/resources/templates/policy_definitions/Miscellaneous/TasksIntegrationEnabled.yaml new file mode 100644 index 0000000000000..57ea8397cc492 --- /dev/null +++ b/components/policy/resources/templates/policy_definitions/Miscellaneous/TasksIntegrationEnabled.yaml @@ -0,0 +1,26 @@ +caption: Enable <ph name="GOOGLE_TASKS_NAME">Google Tasks</ph> integration +default: true +desc: |- + Enables <ph name="GOOGLE_TASKS_NAME">Google Tasks</ph> integration on <ph name="PRODUCT_OS_NAME">$2<ex>Google ChromeOS</ex></ph>. + + If this policy is enabled or left unset, the <ph name="GOOGLE_TASKS_NAME">Google Tasks</ph> integration is enabled for enterprise users. + + If this policy is disabled, the <ph name="GOOGLE_TASKS_NAME">Google Tasks</ph> integration is disabled for enterprise users. +example_value: true +features: + dynamic_refresh: true + per_profile: true +items: +- caption: Enable <ph name="GOOGLE_TASKS_NAME">Google Tasks</ph> integration. + value: true +- caption: Disable <ph name="GOOGLE_TASKS_NAME">Google Tasks</ph> integration. + value: false +owners: +- amitrokhin@google.com +- file://ash/glanceables/OWNERS +schema: + type: boolean +future_on: +- chrome_os +tags: [] +type: main diff --git a/components/policy/test/data/pref_mapping/ClassroomIntegrationEnabled.json b/components/policy/test/data/pref_mapping/ClassroomIntegrationEnabled.json new file mode 100644 index 0000000000000..df23c0de9860a --- /dev/null +++ b/components/policy/test/data/pref_mapping/ClassroomIntegrationEnabled.json @@ -0,0 +1,15 @@ +[ + { + "os": [ + "chromeos_ash" + ], + "simple_policy_pref_mapping_test": { + "pref_name": "ash.classroom_integration_enabled", + "default_value": true, + "values_to_test": [ + true, + false + ] + } + } +] diff --git a/components/policy/test/data/pref_mapping/TasksIntegrationEnabled.json b/components/policy/test/data/pref_mapping/TasksIntegrationEnabled.json new file mode 100644 index 0000000000000..62597d4be5d4d --- /dev/null +++ b/components/policy/test/data/pref_mapping/TasksIntegrationEnabled.json @@ -0,0 +1,15 @@ +[ + { + "os": [ + "chromeos_ash" + ], + "simple_policy_pref_mapping_test": { + "pref_name": "ash.tasks_integration_enabled", + "default_value": true, + "values_to_test": [ + true, + false + ] + } + } +] diff --git a/docs/enterprise/description_guidelines.md b/docs/enterprise/description_guidelines.md index 8e7479d71f4dc..13ddefd2c1a17 100644 --- a/docs/enterprise/description_guidelines.md +++ b/docs/enterprise/description_guidelines.md @@ -23,9 +23,11 @@ tags must be opened and closed on the same line to avoid validation errors. * Google Admin console: `<ph name="GOOGLE_ADMIN_CONSOLE_PRODUCT_NAME">Google Admin console</ph>` * Google Calendar: `<ph name="GOOGLE_CALENDAR_NAME">Google Calendar</ph>` * Google Cast: `<ph name="PRODUCT_NAME">Google Cast</ph>` +* Google Classroom: `<ph name="GOOGLE_CLASSROOM_NAME">Google Classroom</ph>` * Google Cloud Print: `<ph name="CLOUD_PRINT_NAME">Google Cloud Print</ph>` * Google Drive: `<ph name="GOOGLE_DRIVE_NAME">Google Drive</ph>` * Google Photos: `<ph name="GOOGLE_PHOTOS_PRODUCT_NAME">Google Photos</ph>` +* Google Tasks: `<ph name="GOOGLE_TASKS_NAME">Google Tasks</ph>` * Google Update: `<ph name="GOOGLE_UPDATE_NAME">Google Update</ph>` * Google Workspace: `<ph name="GOOGLE_WORKSPACE_PRODUCT_NAME">Google Workspace</ph>` * Lacros: `<ph name="LACROS_NAME">Lacros</ph>` diff --git a/tools/metrics/histograms/metadata/enterprise/enums.xml b/tools/metrics/histograms/metadata/enterprise/enums.xml index 6790d61c54cfe..b982b3cb36d78 100644 --- a/tools/metrics/histograms/metadata/enterprise/enums.xml +++ b/tools/metrics/histograms/metadata/enterprise/enums.xml @@ -2081,6 +2081,8 @@ chromium-metrics-reviews@google.com. <int value="1239" label="ProfileLabel"/> <int value="1240" label="PrivacySandboxFingerprintingProtectionEnabled"/> <int value="1241" label="MultiScreenCaptureAllowedForUrls"/> + <int value="1242" label="ClassroomIntegrationEnabled"/> + <int value="1243" label="TasksIntegrationEnabled"/> </enum> <enum name="EnterprisePoliciesSources">