Add NotebookLM flag to ChromeOS preinstalled web apps
This adds a flag (disabled) to control whether we preinstall NotebookLM on ChromeOS devices. This CL also makes some minor improvements to about flag documentation. Bug: b:402986247 Change-Id: Idc96249539af70ca4d607b0877e2c86e55f8cb6a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6367996 Reviewed-by: Alan Cutter <alancutter@chromium.org> Reviewed-by: Sophia Lin <sophialin@google.com> Commit-Queue: Alan Cutter <alancutter@chromium.org> Cr-Commit-Position: refs/heads/main@{#1437291}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
863df13b0b
commit
1097dc370c
ash/constants
chrome/browser
about_flags.ccflag-metadata.jsonflag_descriptions.ccflag_descriptions.h
ash
extensions
web_applications
chromeos/constants
docs
tools/metrics/histograms
@ -121,6 +121,10 @@ inline constexpr char kGraduationAppId[] = "dcmgllglecpogfcjmdkdncendnjphdcd";
|
||||
// "chrome://help-app/"))
|
||||
inline constexpr char kHelpAppId[] = "nbljnnecbjbmifnoehiemkgefbnpoeak";
|
||||
|
||||
// Generated as: web_app::GenerateAppId(/*manifest_id=*/std::nullopt, GURL(
|
||||
// "https://notebooklm.google.com/"))
|
||||
inline constexpr char kNotebookLmAppId[] = "gjcmcplpgihbecacndmmbaenpfgimlec";
|
||||
|
||||
// Generated as: web_app::GenerateAppId(/*manifest_id=*/std::nullopt, GURL(
|
||||
// "chrome://media-app/"))
|
||||
inline constexpr char kMediaAppId[] = "jhdjimmaggjajfjphpljagpgkidjilnj";
|
||||
|
@ -11926,6 +11926,15 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) ||
|
||||
// BUILDFLAG(IS_CHROME_OS)
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
{"notebook-lm-app-preinstall",
|
||||
flag_descriptions::kNotebookLmAppPreinstallName,
|
||||
flag_descriptions::kNotebookLmAppPreinstallDescription, kOsCrOS,
|
||||
FEATURE_VALUE_TYPE(chromeos::features::kNotebookLmAppPreinstall)},
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
// Add new entries above this line.
|
||||
|
||||
// NOTE: Adding a new flag requires adding a corresponding entry to enum
|
||||
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
|
||||
// Histograms" in tools/metrics/histograms/README.md (run the
|
||||
|
@ -146,6 +146,8 @@ void GetDefault(std::vector<std::string>* app_ids) {
|
||||
|
||||
ash::kMessagesAppId,
|
||||
|
||||
ash::kNotebookLmAppId,
|
||||
|
||||
arc::kYoutubeAppId,
|
||||
extension_misc::kYoutubeAppId,
|
||||
ash::kYoutubeAppId,
|
||||
|
@ -6259,6 +6259,11 @@
|
||||
],
|
||||
"expiry_milestone": 145
|
||||
},
|
||||
{
|
||||
"name": "notebook-lm-app-preinstall",
|
||||
"owners": [ "alancutter@google.com", "crosdev-commerce-eng@google.com" ],
|
||||
"expiry_milestone": 146
|
||||
},
|
||||
{
|
||||
"name": "notification-collision-management",
|
||||
"owners": [ "thegreenfrog@chromium.org", "bling-gsu-pod@google.com" ],
|
||||
|
@ -2593,6 +2593,10 @@ const char kNewEtc1EncoderDescription[] =
|
||||
"thumbnails.";
|
||||
#endif
|
||||
|
||||
const char kNotebookLmAppPreinstallName[] = "NotebookLM app preload";
|
||||
const char kNotebookLmAppPreinstallDescription[] =
|
||||
"Preloads the NotebookLM app.";
|
||||
|
||||
const char kNotificationSchedulerName[] = "Notification scheduler";
|
||||
const char kNotificationSchedulerDescription[] =
|
||||
"Enable notification scheduler feature.";
|
||||
|
@ -1489,6 +1489,9 @@ extern const char kNewEtc1EncoderName[];
|
||||
extern const char kNewEtc1EncoderDescription[];
|
||||
#endif
|
||||
|
||||
extern const char kNotebookLmAppPreinstallName[];
|
||||
extern const char kNotebookLmAppPreinstallDescription[];
|
||||
|
||||
extern const char kNotificationSchedulerName[];
|
||||
extern const char kNotificationSchedulerDescription[];
|
||||
|
||||
|
@ -586,6 +586,8 @@ source_set("web_applications") {
|
||||
"preinstalled_web_apps/google_meet.h",
|
||||
"preinstalled_web_apps/messages_dogfood.cc",
|
||||
"preinstalled_web_apps/messages_dogfood.h",
|
||||
"preinstalled_web_apps/notebook_lm.cc",
|
||||
"preinstalled_web_apps/notebook_lm.h",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -44,26 +44,19 @@ constexpr const std::string_view kShippedPreinstalledAppInstallFeatures[] = {
|
||||
|
||||
bool g_always_enabled_for_testing = false;
|
||||
|
||||
struct FeatureWithEnabledFunction {
|
||||
raw_ref<const base::Feature> feature;
|
||||
bool (*enabled_func)();
|
||||
};
|
||||
|
||||
// A hard coded list of features available for externally installed apps to
|
||||
// gate their installation on via their config file settings. Each feature has a
|
||||
// function to run to determine whether it is enabled. See |kFeatureName| in
|
||||
// preinstalled_web_app_utils.h.
|
||||
// gate their installation on via their config file settings. See |kFeatureName|
|
||||
// in preinstalled_web_app_utils.h.
|
||||
//
|
||||
// After a feature flag has been shipped and should be cleaned up, move it into
|
||||
// kShippedPreinstalledAppInstallFeatures to ensure any external installation
|
||||
// configs that reference it continue to see it as enabled.
|
||||
constexpr const FeatureWithEnabledFunction
|
||||
kPreinstalledAppInstallFeaturesWithEnabledFunctions[] = {
|
||||
constexpr const raw_ref<const base::Feature> kPreinstalledAppInstallFeatures[] =
|
||||
{
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
{raw_ref(chromeos::features::kCloudGamingDevice),
|
||||
&chromeos::features::IsCloudGamingDeviceEnabled},
|
||||
{raw_ref(chromeos::features::kGeminiAppPreinstall),
|
||||
&chromeos::features::IsGeminiAppPreinstallEnabled}
|
||||
raw_ref(chromeos::features::kCloudGamingDevice),
|
||||
raw_ref(chromeos::features::kGeminiAppPreinstall),
|
||||
raw_ref(chromeos::features::kNotebookLmAppPreinstall),
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -108,10 +101,10 @@ bool IsPreinstalledAppInstallFeatureEnabled(std::string_view feature_name) {
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& feature_with_function :
|
||||
kPreinstalledAppInstallFeaturesWithEnabledFunctions) {
|
||||
if (feature_with_function.feature->name == feature_name) {
|
||||
return feature_with_function.enabled_func();
|
||||
for (const raw_ref<const base::Feature> feature :
|
||||
kPreinstalledAppInstallFeatures) {
|
||||
if (feature->name == feature_name) {
|
||||
return base::FeatureList::IsEnabled(*feature);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
// Copyright 2025 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "chrome/browser/web_applications/preinstalled_web_apps/notebook_lm.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "ash/constants/web_app_id_constants.h"
|
||||
#include "chrome/browser/apps/user_type_filter.h"
|
||||
#include "chrome/browser/web_applications/external_install_options.h"
|
||||
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h"
|
||||
#include "chrome/browser/web_applications/web_app_constants.h"
|
||||
#include "chromeos/constants/chromeos_features.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace web_app {
|
||||
|
||||
ExternalInstallOptions GetConfigForNotebookLm() {
|
||||
static constexpr char kUrl[] = "https://notebooklm.google.com/install";
|
||||
ExternalInstallOptions options(
|
||||
/*install_url=*/GURL(kUrl),
|
||||
/*user_display_mode=*/mojom::UserDisplayMode::kStandalone,
|
||||
/*install_source=*/ExternalInstallSource::kExternalDefault);
|
||||
options.add_to_applications_menu = true;
|
||||
options.add_to_search = true;
|
||||
options.expected_app_id = ash::kNotebookLmAppId;
|
||||
options.gate_on_feature = chromeos::features::kNotebookLmAppPreinstall.name;
|
||||
options.is_preferred_app_for_supported_links = true;
|
||||
options.user_type_allowlist = {apps::kUserTypeUnmanaged};
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
} // namespace web_app
|
@ -0,0 +1,17 @@
|
||||
// Copyright 2025 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CHROME_BROWSER_WEB_APPLICATIONS_PREINSTALLED_WEB_APPS_NOTEBOOK_LM_H_
|
||||
#define CHROME_BROWSER_WEB_APPLICATIONS_PREINSTALLED_WEB_APPS_NOTEBOOK_LM_H_
|
||||
|
||||
#include "chrome/browser/web_applications/external_install_options.h"
|
||||
|
||||
namespace web_app {
|
||||
|
||||
// Returns the config for preinstalling the NotebookLm app.
|
||||
ExternalInstallOptions GetConfigForNotebookLm();
|
||||
|
||||
} // namespace web_app
|
||||
|
||||
#endif // CHROME_BROWSER_WEB_APPLICATIONS_PREINSTALLED_WEB_APPS_NOTEBOOK_LM_H_
|
@ -37,6 +37,7 @@
|
||||
#include "chrome/browser/web_applications/preinstalled_web_apps/google_calendar.h"
|
||||
#include "chrome/browser/web_applications/preinstalled_web_apps/google_meet.h"
|
||||
#include "chrome/browser/web_applications/preinstalled_web_apps/messages_dogfood.h"
|
||||
#include "chrome/browser/web_applications/preinstalled_web_apps/notebook_lm.h"
|
||||
#include "chrome/common/extensions/extension_constants.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "google_apis/gaia/gaia_auth_util.h"
|
||||
@ -98,6 +99,7 @@ std::vector<ExternalInstallOptions> GetChromeBrandedApps(
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
GetConfigForCalculator(),
|
||||
GetConfigForGemini(device_info),
|
||||
GetConfigForNotebookLm(),
|
||||
GetConfigForGoogleCalendar(),
|
||||
GetConfigForGoogleChat(/*is_standalone=*/true,
|
||||
/*only_for_new_users=*/false),
|
||||
|
@ -160,6 +160,11 @@ BASE_FEATURE(kMahiSummarizeSelected,
|
||||
"MahiSummarizeSelected",
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
// Controls whether NotebookLM is preinstalled.
|
||||
BASE_FEATURE(kNotebookLmAppPreinstall,
|
||||
"NotebookLmAppPreinstall",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
// Kill switch to disable the new guest profile implementation on CrOS that is
|
||||
// consistent with desktop chrome.
|
||||
// TODO(crbug.com/40233408): Remove if the change is fully launched.
|
||||
|
@ -76,6 +76,8 @@ BASE_DECLARE_FEATURE(kFeatureManagementDisableChromeCompose);
|
||||
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
|
||||
BASE_DECLARE_FEATURE(kFeatureManagementRoundedWindows);
|
||||
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
|
||||
BASE_DECLARE_FEATURE(kNotebookLmAppPreinstall);
|
||||
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
|
||||
BASE_DECLARE_FEATURE(kNewGuestProfile);
|
||||
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
|
||||
BASE_DECLARE_FEATURE(kNotificationWidthIncrease);
|
||||
|
@ -105,7 +105,7 @@ for WebView flags.
|
||||
|
||||
You have to modify these five files in total.
|
||||
|
||||
* [chrome/browser/about_flags.cc](https://cs.chromium.org/chromium/src/chrome/browser/about_flags.cc) (Add your changes at the bottom of the list)
|
||||
* [chrome/browser/about_flags.cc](https://cs.chromium.org/chromium/src/chrome/browser/about_flags.cc) (Add your changes at the bottom of the list, search for "Add new entries above this line.")
|
||||
* [chrome/browser/flag_descriptions.cc](https://cs.chromium.org/chromium/src/chrome/browser/flag_descriptions.cc) (Features should be alphabetically sorted)
|
||||
* [chrome/browser/flag_descriptions.h](https://cs.chromium.org/chromium/src/chrome/browser/flag_descriptions.h) (Features should be alphabetically sorted)
|
||||
* [tools/metrics/histograms/enums.xml](https://cs.chromium.org/chromium/src/tools/metrics/histograms/enums.xml)
|
||||
|
@ -12133,6 +12133,7 @@ from previous Chrome versions.
|
||||
<int value="-792079435" label="EnableAppsGridGapFeature:disabled"/>
|
||||
<int value="-791916053" label="FriendlierErrorDialog:disabled"/>
|
||||
<int value="-791778534" label="LauncherQueryHighlighting:enabled"/>
|
||||
<int value="-791730714" label="NotebookLmAppPreinstall:disabled"/>
|
||||
<int value="-791590673" label="bookmarks-tree-view:enabled"/>
|
||||
<int value="-790900615" label="NtpShoppingTasksModule:disabled"/>
|
||||
<int value="-790544721"
|
||||
@ -14370,6 +14371,7 @@ from previous Chrome versions.
|
||||
<int value="86582659" label="enable-extension-ai-data-collection"/>
|
||||
<int value="86900696" label="SanitizerAPIv0:enabled"/>
|
||||
<int value="87306743" label="VariationsFakeCrashAfterStartup:disabled"/>
|
||||
<int value="88127181" label="NotebookLmAppPreinstall:enabled"/>
|
||||
<int value="88437020" label="FeaturePolicy:enabled"/>
|
||||
<int value="88863813" label="DesktopPWAsDetailedInstallDialog:enabled"/>
|
||||
<int value="89036875" label="DeferRendererTasksAfterInput:disabled"/>
|
||||
|
Reference in New Issue
Block a user