mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-13 15:46:22 +00:00
feat: chromium 146 upgrade (#393)
* feat: update to 146, fix clean * fix: update all 16 failed patches for Chromium 146.0.7680.31 - Update BASE_COMMIT to 4d3225104176d (Chromium 146) - Shift BrowserOS command IDs to avoid upstream 40300-40302 conflict - Fix settings BUILD.gn and menu patches for upstream removals - Shift syncable prefs IDs to 100379-100380 after upstream additions - Migrate theme patch from theme_service_factory.cc to theme_service.cc (RegisterProfilePrefs moved upstream) - Fix toolbar_actions_model.cc for upstream API changes - Fix toolbar_pref_names.cc for upstream base::ListValue usage - Fix ui_features.cc/.h for removed kPopupBrowserUseNewLayout - Fix api_sources.gni for new upstream entries - Shift infobar delegate ID to 132 - Shift extension histogram values by +4 (1961-1985) - Shift api_permission_id kBrowserOS to 265 - Update histogram enums.xml to match shifted values - Delete chromium_install_modes.cc patch (file removed in 146) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: enable vertical tabs * feat: default browseros theme * chore: bump PATCH and OFFSET * fix: update extensions-manifestv2 series patch for Chromium 146 Regenerated the patch from a clean diff against 146.0.7680.31 to fix line number offsets and context mismatches in extensions_ui.cc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update vertical_tab_strip_state_controller patch for Chromium 146 Upstream refactored includes and renamed NotifyStateChanged to NotifyModeChanged. Regenerated patch with correct context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update default theme to neutral gray (136,136,136) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: rename base::Value::Dict/List to base::DictValue/ListValue for Chromium 146 Chromium 146 moved base::Value::Dict and base::Value::List to top-level classes base::DictValue and base::ListValue. Updated all 23 patch files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: regenerate browseros_prefs.cc patch (fix corrupt trailing newline) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: update patches for Chromium 146 build API changes - browseros_action_utils.h: remove nonexistent base/containers/contains.h include - chrome_content_browser_client.cc: PrivateNetworkRequestPolicyOverride → LocalNetworkAccessRequestPolicyOverride - extension_updater.cc: InstallStageTracker::Get → InstallStageTrackerFactory::GetForBrowserContext - toolbar_actions_model.cc: base::Contains → std::ranges::contains Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1 +1 @@
|
||||
7ad2aeb6be387
|
||||
4d3225104176d
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
MAJOR=145
|
||||
MAJOR=146
|
||||
MINOR=0
|
||||
BUILD=7632
|
||||
PATCH=45
|
||||
BUILD=7680
|
||||
PATCH=31
|
||||
|
||||
@@ -1 +1 @@
|
||||
128
|
||||
130
|
||||
|
||||
8
packages/browseros/build/modules/setup/clean.py
generated
8
packages/browseros/build/modules/setup/clean.py
generated
@@ -38,6 +38,14 @@ class CleanModule(CommandModule):
|
||||
def _git_reset(self, ctx: Context) -> None:
|
||||
run_command(["git", "reset", "--hard", "HEAD"], cwd=ctx.chromium_src)
|
||||
|
||||
# Reset all dirty submodules so gclient sync doesn't choke
|
||||
log_info("🧹 Resetting dirty submodules...")
|
||||
run_command(
|
||||
["git", "submodule", "foreach", "--recursive",
|
||||
"git checkout -- . && git clean -fd"],
|
||||
cwd=ctx.chromium_src,
|
||||
)
|
||||
|
||||
log_info("🧹 Running git clean with exclusions...")
|
||||
run_command(
|
||||
[
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
diff --git a/chrome/app/chrome_command_ids.h b/chrome/app/chrome_command_ids.h
|
||||
index 650fa7987ac19..d685c16726d1c 100644
|
||||
index 2fe1c5d1ff982..aef3c11d6be07 100644
|
||||
--- a/chrome/app/chrome_command_ids.h
|
||||
+++ b/chrome/app/chrome_command_ids.h
|
||||
@@ -304,6 +304,11 @@
|
||||
#define IDC_SHOW_COMMENTS_SIDE_PANEL 40297
|
||||
#define IDC_RECENT_TABS_SEE_DEVICE_TABS 40298
|
||||
#define IDC_SHOW_AI_MODE_OMNIBOX_BUTTON 40299
|
||||
@@ -309,6 +309,11 @@
|
||||
#define IDC_CONTENT_CONTEXT_INSPECTELEMENT_WITH_GEMINI 40300
|
||||
#define IDC_CONTENT_CONTEXT_INSPECTELEMENT_WITH_DEVTOOLS 40301
|
||||
#define IDC_REPORT_UNSAFE_SITE 40302
|
||||
+// BrowserOS: custom command IDs
|
||||
+#define IDC_SHOW_THIRD_PARTY_LLM_SIDE_PANEL 40300
|
||||
+#define IDC_CYCLE_THIRD_PARTY_LLM_PROVIDER 40301
|
||||
+#define IDC_OPEN_CLASH_OF_GPTS 40302
|
||||
+#define IDC_TOGGLE_BROWSEROS_AGENT 40303
|
||||
+#define IDC_SHOW_THIRD_PARTY_LLM_SIDE_PANEL 40303
|
||||
+#define IDC_CYCLE_THIRD_PARTY_LLM_PROVIDER 40304
|
||||
+#define IDC_OPEN_CLASH_OF_GPTS 40305
|
||||
+#define IDC_TOGGLE_BROWSEROS_AGENT 40306
|
||||
|
||||
// Spell-check
|
||||
// Insert any additional suggestions before _LAST; these have to be consecutive.
|
||||
|
||||
@@ -3,7 +3,7 @@ new file mode 100644
|
||||
index 0000000000000..0adfaa4a8ac83
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/browseros/core/browseros_action_utils.h
|
||||
@@ -0,0 +1,71 @@
|
||||
@@ -0,0 +1,70 @@
|
||||
+// 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.
|
||||
@@ -14,7 +14,6 @@ index 0000000000000..0adfaa4a8ac83
|
||||
+#include <string>
|
||||
+#include <string_view>
|
||||
+
|
||||
+#include "base/containers/contains.h"
|
||||
+#include "base/containers/fixed_flat_set.h"
|
||||
+#include "chrome/browser/browseros/core/browseros_constants.h"
|
||||
+#include "chrome/browser/ui/actions/chrome_action_id.h"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
diff --git a/chrome/browser/browseros/core/browseros_prefs.cc b/chrome/browser/browseros/core/browseros_prefs.cc
|
||||
new file mode 100644
|
||||
index 0000000000000..f3a2e43cd7af2
|
||||
index 0000000000000..38f09f1f42dc4
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/browseros/core/browseros_prefs.cc
|
||||
@@ -0,0 +1,90 @@
|
||||
@@ -0,0 +1,89 @@
|
||||
+// 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.
|
||||
@@ -63,14 +63,13 @@ index 0000000000000..f3a2e43cd7af2
|
||||
+ const PrefService::Preference* user_color_pref =
|
||||
+ pref_service->FindPreference(::prefs::kUserColor);
|
||||
+ if (user_color_pref && user_color_pref->IsDefaultValue()) {
|
||||
+ // Blue tonal spot: SkColorSetRGB(140, 171, 228)
|
||||
+ pref_service->SetInteger(::prefs::kUserColor,
|
||||
+ static_cast<int>(SkColorSetRGB(140, 171, 228)));
|
||||
+ static_cast<int>(SkColorSetRGB(136, 136, 136)));
|
||||
+ pref_service->SetString(::prefs::kCurrentThemeID,
|
||||
+ "user_color_theme_id");
|
||||
+ pref_service->SetInteger(
|
||||
+ ::prefs::kBrowserColorVariant,
|
||||
+ static_cast<int>(ui::mojom::BrowserColorVariant::kTonalSpot));
|
||||
+ static_cast<int>(ui::mojom::BrowserColorVariant::kNeutral));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
|
||||
@@ -112,23 +112,23 @@ index 0000000000000..ad2da65f1d4f4
|
||||
+}
|
||||
+
|
||||
+// static
|
||||
+base::Value::Dict BrowserOSExtensionInstaller::ReadBundledManifest(
|
||||
+base::DictValue BrowserOSExtensionInstaller::ReadBundledManifest(
|
||||
+ const base::FilePath& manifest_path,
|
||||
+ const base::FilePath& bundled_path) {
|
||||
+ std::string json_content;
|
||||
+ if (!base::ReadFileToString(manifest_path, &json_content)) {
|
||||
+ LOG(ERROR) << "browseros: Failed to read bundled manifest";
|
||||
+ return base::Value::Dict();
|
||||
+ return base::DictValue();
|
||||
+ }
|
||||
+
|
||||
+ std::optional<base::Value> parsed =
|
||||
+ base::JSONReader::Read(json_content, base::JSON_PARSE_RFC);
|
||||
+ if (!parsed || !parsed->is_dict()) {
|
||||
+ LOG(ERROR) << "browseros: Invalid bundled manifest JSON";
|
||||
+ return base::Value::Dict();
|
||||
+ return base::DictValue();
|
||||
+ }
|
||||
+
|
||||
+ base::Value::Dict prefs;
|
||||
+ base::DictValue prefs;
|
||||
+
|
||||
+ for (const auto [extension_id, config] : parsed->GetDict()) {
|
||||
+ if (!config.is_dict()) {
|
||||
@@ -142,7 +142,7 @@ index 0000000000000..ad2da65f1d4f4
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict& config_dict = config.GetDict();
|
||||
+ const base::DictValue& config_dict = config.GetDict();
|
||||
+ const std::string* crx_file = config_dict.FindString("external_crx");
|
||||
+ const std::string* version = config_dict.FindString("external_version");
|
||||
+
|
||||
@@ -160,7 +160,7 @@ index 0000000000000..ad2da65f1d4f4
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ base::Value::Dict ext_prefs;
|
||||
+ base::DictValue ext_prefs;
|
||||
+ ext_prefs.Set(extensions::ExternalProviderImpl::kExternalCrx,
|
||||
+ crx_path.AsUTF8Unsafe());
|
||||
+ ext_prefs.Set(extensions::ExternalProviderImpl::kExternalVersion, *version);
|
||||
@@ -175,7 +175,7 @@ index 0000000000000..ad2da65f1d4f4
|
||||
+
|
||||
+void BrowserOSExtensionInstaller::OnBundledLoadComplete(
|
||||
+ const base::FilePath& bundled_path,
|
||||
+ base::Value::Dict prefs) {
|
||||
+ base::DictValue prefs) {
|
||||
+ LOG(INFO) << "browseros: Bundled load complete, " << prefs.size()
|
||||
+ << " extensions from " << bundled_path.value();
|
||||
+
|
||||
@@ -233,7 +233,7 @@ index 0000000000000..ad2da65f1d4f4
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ base::Value::Dict extensions_config = ParseConfigJson(*response_body);
|
||||
+ base::DictValue extensions_config = ParseConfigJson(*response_body);
|
||||
+
|
||||
+ if (extensions_config.empty()) {
|
||||
+ Complete(InstallResult());
|
||||
@@ -258,8 +258,8 @@ index 0000000000000..ad2da65f1d4f4
|
||||
+
|
||||
+ result.extension_ids.insert(extension_id);
|
||||
+
|
||||
+ const base::Value::Dict& config_dict = config.GetDict();
|
||||
+ base::Value::Dict ext_prefs;
|
||||
+ const base::DictValue& config_dict = config.GetDict();
|
||||
+ base::DictValue ext_prefs;
|
||||
+
|
||||
+ if (const std::string* update_url = config_dict.FindString(
|
||||
+ extensions::ExternalProviderImpl::kExternalUpdateUrl)) {
|
||||
@@ -289,22 +289,22 @@ index 0000000000000..ad2da65f1d4f4
|
||||
+ Complete(std::move(result));
|
||||
+}
|
||||
+
|
||||
+base::Value::Dict BrowserOSExtensionInstaller::ParseConfigJson(
|
||||
+base::DictValue BrowserOSExtensionInstaller::ParseConfigJson(
|
||||
+ const std::string& json_content) {
|
||||
+ std::optional<base::Value> parsed =
|
||||
+ base::JSONReader::Read(json_content, base::JSON_PARSE_RFC);
|
||||
+
|
||||
+ if (!parsed || !parsed->is_dict()) {
|
||||
+ LOG(ERROR) << "browseros: Invalid config JSON";
|
||||
+ return base::Value::Dict();
|
||||
+ return base::DictValue();
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict* extensions =
|
||||
+ const base::DictValue* extensions =
|
||||
+ parsed->GetDict().FindDict("extensions");
|
||||
+
|
||||
+ if (!extensions) {
|
||||
+ LOG(ERROR) << "browseros: No 'extensions' key in config";
|
||||
+ return base::Value::Dict();
|
||||
+ return base::DictValue();
|
||||
+ }
|
||||
+
|
||||
+ return extensions->Clone();
|
||||
|
||||
@@ -40,8 +40,8 @@ index 0000000000000..9a3c2000ed05a
|
||||
+ InstallResult(InstallResult&&);
|
||||
+ InstallResult& operator=(InstallResult&&);
|
||||
+
|
||||
+ base::Value::Dict prefs; // Extension prefs for ExternalProviderImpl
|
||||
+ base::Value::Dict config; // Raw config for maintenance
|
||||
+ base::DictValue prefs; // Extension prefs for ExternalProviderImpl
|
||||
+ base::DictValue config; // Raw config for maintenance
|
||||
+ std::set<std::string> extension_ids;
|
||||
+ base::FilePath bundled_path; // Set if loaded from bundled
|
||||
+ bool from_bundled = false;
|
||||
@@ -70,13 +70,13 @@ index 0000000000000..9a3c2000ed05a
|
||||
+ bool TryLoadFromBundled();
|
||||
+
|
||||
+ // Reads bundled manifest on FILE thread.
|
||||
+ static base::Value::Dict ReadBundledManifest(
|
||||
+ static base::DictValue ReadBundledManifest(
|
||||
+ const base::FilePath& manifest_path,
|
||||
+ const base::FilePath& bundled_path);
|
||||
+
|
||||
+ // Called when bundled manifest read completes.
|
||||
+ void OnBundledLoadComplete(const base::FilePath& bundled_path,
|
||||
+ base::Value::Dict prefs);
|
||||
+ base::DictValue prefs);
|
||||
+
|
||||
+ // Fetches config from remote URL.
|
||||
+ void FetchFromRemote();
|
||||
@@ -85,7 +85,7 @@ index 0000000000000..9a3c2000ed05a
|
||||
+ void OnRemoteFetchComplete(std::optional<std::string> response_body);
|
||||
+
|
||||
+ // Parses config JSON and returns extensions dict.
|
||||
+ base::Value::Dict ParseConfigJson(const std::string& json_content);
|
||||
+ base::DictValue ParseConfigJson(const std::string& json_content);
|
||||
+
|
||||
+ // Completes the installation with the given result.
|
||||
+ void Complete(InstallResult result);
|
||||
|
||||
@@ -121,7 +121,7 @@ index 0000000000000..e61b45d08b7e2
|
||||
+}
|
||||
+
|
||||
+void BrowserOSExtensionLoader::InstallRemoteExtensionsNow(
|
||||
+ base::Value::Dict config) {
|
||||
+ base::DictValue config) {
|
||||
+ if (!profile_ || extension_ids_.empty() || config.empty()) {
|
||||
+ return;
|
||||
+ }
|
||||
@@ -143,7 +143,7 @@ index 0000000000000..e61b45d08b7e2
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict* ext_config = config.FindDict(id);
|
||||
+ const base::DictValue* ext_config = config.FindDict(id);
|
||||
+ if (!ext_config) {
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
@@ -63,7 +63,7 @@ index 0000000000000..2a14e9068156e
|
||||
+ void OnStartupComplete(bool from_bundled);
|
||||
+
|
||||
+ // Installs remote extensions immediately via PendingExtensionManager + updater.
|
||||
+ void InstallRemoteExtensionsNow(base::Value::Dict config);
|
||||
+ void InstallRemoteExtensionsNow(base::DictValue config);
|
||||
+
|
||||
+ // Installs bundled CRX extensions immediately via CrxInstaller.
|
||||
+ void InstallBundledExtensionsNow();
|
||||
@@ -74,7 +74,7 @@ index 0000000000000..2a14e9068156e
|
||||
+
|
||||
+ std::set<std::string> extension_ids_;
|
||||
+ std::map<std::string, std::string> bundled_versions_;
|
||||
+ base::Value::Dict last_config_;
|
||||
+ base::DictValue last_config_;
|
||||
+
|
||||
+ std::unique_ptr<BrowserOSExtensionInstaller> installer_;
|
||||
+ std::unique_ptr<BrowserOSExtensionMaintainer> maintainer_;
|
||||
|
||||
@@ -70,7 +70,7 @@ index 0000000000000..bb33ae5d3b156
|
||||
+
|
||||
+void BrowserOSExtensionMaintainer::Start(const GURL& config_url,
|
||||
+ std::set<std::string> extension_ids,
|
||||
+ base::Value::Dict initial_config) {
|
||||
+ base::DictValue initial_config) {
|
||||
+ config_url_ = config_url;
|
||||
+ extension_ids_ = std::move(extension_ids);
|
||||
+ last_config_ = std::move(initial_config);
|
||||
@@ -127,7 +127,7 @@ index 0000000000000..bb33ae5d3b156
|
||||
+ std::unique_ptr<network::SimpleURLLoader> loader,
|
||||
+ std::optional<std::string> response_body) {
|
||||
+ if (response_body.has_value()) {
|
||||
+ base::Value::Dict config = ParseConfigJson(*response_body);
|
||||
+ base::DictValue config = ParseConfigJson(*response_body);
|
||||
+ if (!config.empty()) {
|
||||
+ last_config_ = std::move(config);
|
||||
+
|
||||
@@ -148,22 +148,22 @@ index 0000000000000..bb33ae5d3b156
|
||||
+ ScheduleNextMaintenance();
|
||||
+}
|
||||
+
|
||||
+base::Value::Dict BrowserOSExtensionMaintainer::ParseConfigJson(
|
||||
+base::DictValue BrowserOSExtensionMaintainer::ParseConfigJson(
|
||||
+ const std::string& json_content) {
|
||||
+ std::optional<base::Value> parsed =
|
||||
+ base::JSONReader::Read(json_content, base::JSON_PARSE_RFC);
|
||||
+
|
||||
+ if (!parsed || !parsed->is_dict()) {
|
||||
+ LOG(ERROR) << "browseros: Invalid config JSON";
|
||||
+ return base::Value::Dict();
|
||||
+ return base::DictValue();
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict* extensions =
|
||||
+ const base::DictValue* extensions =
|
||||
+ parsed->GetDict().FindDict("extensions");
|
||||
+
|
||||
+ if (!extensions) {
|
||||
+ LOG(ERROR) << "browseros: No 'extensions' key in config";
|
||||
+ return base::Value::Dict();
|
||||
+ return base::DictValue();
|
||||
+ }
|
||||
+
|
||||
+ return extensions->Clone();
|
||||
@@ -246,7 +246,7 @@ index 0000000000000..bb33ae5d3b156
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict* config = last_config_.FindDict(id);
|
||||
+ const base::DictValue* config = last_config_.FindDict(id);
|
||||
+ if (!config) {
|
||||
+ continue;
|
||||
+ }
|
||||
@@ -364,7 +364,7 @@ index 0000000000000..bb33ae5d3b156
|
||||
+ }
|
||||
+
|
||||
+ std::string state;
|
||||
+ base::Value::Dict properties;
|
||||
+ base::DictValue properties;
|
||||
+ properties.Set("extension_id", id);
|
||||
+ properties.Set("context", context);
|
||||
+
|
||||
|
||||
@@ -46,7 +46,7 @@ index 0000000000000..eb68969a4163f
|
||||
+ // Starts maintenance with an initial delay.
|
||||
+ void Start(const GURL& config_url,
|
||||
+ std::set<std::string> extension_ids,
|
||||
+ base::Value::Dict initial_config);
|
||||
+ base::DictValue initial_config);
|
||||
+
|
||||
+ // Updates the set of tracked extension IDs.
|
||||
+ void UpdateExtensionIds(std::set<std::string> ids);
|
||||
@@ -60,7 +60,7 @@ index 0000000000000..eb68969a4163f
|
||||
+ std::optional<std::string> response_body);
|
||||
+
|
||||
+ // Parses config JSON and returns extensions dict.
|
||||
+ base::Value::Dict ParseConfigJson(const std::string& json_content);
|
||||
+ base::DictValue ParseConfigJson(const std::string& json_content);
|
||||
+
|
||||
+ // Executes all maintenance tasks.
|
||||
+ void ExecuteMaintenanceTasks();
|
||||
@@ -78,7 +78,7 @@ index 0000000000000..eb68969a4163f
|
||||
+ raw_ptr<Profile> profile_;
|
||||
+ GURL config_url_;
|
||||
+ std::set<std::string> extension_ids_;
|
||||
+ base::Value::Dict last_config_;
|
||||
+ base::DictValue last_config_;
|
||||
+
|
||||
+ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
|
||||
+
|
||||
|
||||
@@ -47,7 +47,7 @@ index 0000000000000..cf1a9a0c1790b
|
||||
+ return BrowserOSMetricsServiceFactory::GetForBrowserContext(profile);
|
||||
+}
|
||||
+
|
||||
+void LogOnUIThread(const std::string& event_name, base::Value::Dict properties) {
|
||||
+void LogOnUIThread(const std::string& event_name, base::DictValue properties) {
|
||||
+ auto* service = GetMetricsService();
|
||||
+ if (service) {
|
||||
+ service->CaptureEvent(event_name, std::move(properties));
|
||||
@@ -60,14 +60,14 @@ index 0000000000000..cf1a9a0c1790b
|
||||
+
|
||||
+// static
|
||||
+void BrowserOSMetrics::Log(const std::string& event_name, double sample_rate) {
|
||||
+ Log(event_name, base::Value::Dict(), sample_rate);
|
||||
+ Log(event_name, base::DictValue(), sample_rate);
|
||||
+}
|
||||
+
|
||||
+// static
|
||||
+void BrowserOSMetrics::Log(const std::string& event_name,
|
||||
+ std::initializer_list<std::pair<std::string, base::Value>> properties,
|
||||
+ double sample_rate) {
|
||||
+ base::Value::Dict dict;
|
||||
+ base::DictValue dict;
|
||||
+ for (const auto& [key, value] : properties) {
|
||||
+ dict.Set(key, value.Clone());
|
||||
+ }
|
||||
@@ -75,7 +75,7 @@ index 0000000000000..cf1a9a0c1790b
|
||||
+}
|
||||
+
|
||||
+// static
|
||||
+void BrowserOSMetrics::Log(const std::string& event_name, base::Value::Dict properties,
|
||||
+void BrowserOSMetrics::Log(const std::string& event_name, base::DictValue properties,
|
||||
+ double sample_rate) {
|
||||
+ if (sample_rate <= 0.0 || sample_rate > 1.0) {
|
||||
+ return;
|
||||
|
||||
@@ -34,7 +34,7 @@ index 0000000000000..6da70921b619a
|
||||
+ double sample_rate = 1.0);
|
||||
+
|
||||
+ // Log an event with pre-built properties dict
|
||||
+ static void Log(const std::string& event_name, base::Value::Dict properties,
|
||||
+ static void Log(const std::string& event_name, base::DictValue properties,
|
||||
+ double sample_rate = 1.0);
|
||||
+
|
||||
+ private:
|
||||
|
||||
@@ -91,7 +91,7 @@ index 0000000000000..cbc1f29e5d407
|
||||
+BrowserOSMetricsService::~BrowserOSMetricsService() = default;
|
||||
+
|
||||
+void BrowserOSMetricsService::CaptureEvent(const std::string& event_name,
|
||||
+ base::Value::Dict properties) {
|
||||
+ base::DictValue properties) {
|
||||
+ if (event_name.empty()) {
|
||||
+ LOG(WARNING) << "browseros: Attempted to capture event with empty name";
|
||||
+ return;
|
||||
@@ -159,9 +159,9 @@ index 0000000000000..cbc1f29e5d407
|
||||
+
|
||||
+void BrowserOSMetricsService::SendEventToPostHog(
|
||||
+ const std::string& event_name,
|
||||
+ base::Value::Dict properties) {
|
||||
+ base::DictValue properties) {
|
||||
+ // Build the request payload
|
||||
+ base::Value::Dict payload;
|
||||
+ base::DictValue payload;
|
||||
+ payload.Set("api_key", kPostHogApiKey);
|
||||
+ payload.Set("event", "browseros.native." + event_name);
|
||||
+ payload.Set("distinct_id", client_id_);
|
||||
@@ -216,7 +216,7 @@ index 0000000000000..cbc1f29e5d407
|
||||
+}
|
||||
+
|
||||
+void BrowserOSMetricsService::AddDefaultProperties(
|
||||
+ base::Value::Dict& properties) {
|
||||
+ base::DictValue& properties) {
|
||||
+ // Add browser version
|
||||
+ properties.Set("$browser_version", version_info::GetVersionNumber());
|
||||
+
|
||||
|
||||
@@ -49,7 +49,7 @@ index 0000000000000..beadbcfd183e0
|
||||
+ // Properties should not contain PII. Common properties like client_id,
|
||||
+ // browser version, and OS are added automatically.
|
||||
+ void CaptureEvent(const std::string& event_name,
|
||||
+ base::Value::Dict properties);
|
||||
+ base::DictValue properties);
|
||||
+
|
||||
+ // Returns the stable client ID for this profile.
|
||||
+ std::string GetClientId() const;
|
||||
@@ -69,14 +69,14 @@ index 0000000000000..beadbcfd183e0
|
||||
+
|
||||
+ // Sends the event to PostHog API.
|
||||
+ void SendEventToPostHog(const std::string& event_name,
|
||||
+ base::Value::Dict properties);
|
||||
+ base::DictValue properties);
|
||||
+
|
||||
+ // Handles the response from PostHog API.
|
||||
+ void OnPostHogResponse(std::unique_ptr<network::SimpleURLLoader> loader,
|
||||
+ std::optional<std::string> response_body);
|
||||
+
|
||||
+ // Adds default properties to the event.
|
||||
+ void AddDefaultProperties(base::Value::Dict& properties);
|
||||
+ void AddDefaultProperties(base::DictValue& properties);
|
||||
+
|
||||
+ // PrefService for storing the stable client ID (profile prefs).
|
||||
+ raw_ptr<PrefService> pref_service_;
|
||||
|
||||
@@ -747,7 +747,7 @@ index 0000000000000..9050130727fc8
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict& dict = json->GetDict();
|
||||
+ const base::DictValue& dict = json->GetDict();
|
||||
+ std::optional<bool> can_update = dict.FindBool("can_update");
|
||||
+
|
||||
+ if (!can_update.has_value()) {
|
||||
@@ -763,7 +763,7 @@ index 0000000000000..9050130727fc8
|
||||
+ if (!can_update) {
|
||||
+ LOG(INFO) << "browseros: Server busy, will retry hot-swap at next check";
|
||||
+
|
||||
+ base::Value::Dict props;
|
||||
+ base::DictValue props;
|
||||
+ props.Set("pending_version", pending_item_.version.GetString());
|
||||
+ browseros_metrics::BrowserOSMetrics::Log("server.ota.busy",
|
||||
+ std::move(props));
|
||||
@@ -813,7 +813,7 @@ index 0000000000000..9050130727fc8
|
||||
+ CleanupPendingUpdate();
|
||||
+
|
||||
+ // Log success metric
|
||||
+ base::Value::Dict props;
|
||||
+ base::DictValue props;
|
||||
+ props.Set("old_version",
|
||||
+ old_version.IsValid() ? old_version.GetString() : "none");
|
||||
+ props.Set("new_version", new_version.GetString());
|
||||
@@ -1028,7 +1028,7 @@ index 0000000000000..9050130727fc8
|
||||
+ }
|
||||
+
|
||||
+ if (deleted > 0) {
|
||||
+ base::Value::Dict props;
|
||||
+ base::DictValue props;
|
||||
+ props.Set("deleted_count", deleted);
|
||||
+ browseros_metrics::BrowserOSMetrics::Log("server.ota.cleanup",
|
||||
+ std::move(props));
|
||||
@@ -1041,7 +1041,7 @@ index 0000000000000..9050130727fc8
|
||||
+ const std::string& error) {
|
||||
+ LOG(ERROR) << "browseros: Update error at " << stage << ": " << error;
|
||||
+
|
||||
+ base::Value::Dict props;
|
||||
+ base::DictValue props;
|
||||
+ props.Set("stage", stage);
|
||||
+ props.Set("error", error);
|
||||
+ if (pending_item_.version.IsValid()) {
|
||||
|
||||
@@ -282,7 +282,7 @@ index 0000000000000..8b3137bf24e8a
|
||||
+ return std::nullopt;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict& dict = parsed->GetDict();
|
||||
+ const base::DictValue& dict = parsed->GetDict();
|
||||
+ std::optional<int> pid = dict.FindInt("pid");
|
||||
+ std::optional<double> creation_time = dict.FindDouble("creation_time");
|
||||
+
|
||||
@@ -306,7 +306,7 @@ index 0000000000000..8b3137bf24e8a
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ base::Value::Dict dict;
|
||||
+ base::DictValue dict;
|
||||
+ dict.Set("pid", static_cast<int>(state.pid));
|
||||
+ dict.Set("creation_time", static_cast<double>(state.creation_time));
|
||||
+
|
||||
|
||||
@@ -40,28 +40,28 @@ index 0000000000000..a398856f672fd
|
||||
+ const base::FilePath& actual_resources_dir) {
|
||||
+ base::FilePath config_path = config.paths.execution.Append(kConfigFileName);
|
||||
+
|
||||
+ base::Value::Dict root;
|
||||
+ base::DictValue root;
|
||||
+
|
||||
+ // ports
|
||||
+ base::Value::Dict ports_dict;
|
||||
+ base::DictValue ports_dict;
|
||||
+ ports_dict.Set("cdp", config.ports.cdp);
|
||||
+ ports_dict.Set("server", config.ports.server);
|
||||
+ ports_dict.Set("extension", config.ports.extension);
|
||||
+ root.Set("ports", std::move(ports_dict));
|
||||
+
|
||||
+ // directories
|
||||
+ base::Value::Dict directories;
|
||||
+ base::DictValue directories;
|
||||
+ directories.Set("resources", actual_resources_dir.AsUTF8Unsafe());
|
||||
+ directories.Set("execution", config.paths.execution.AsUTF8Unsafe());
|
||||
+ root.Set("directories", std::move(directories));
|
||||
+
|
||||
+ // flags
|
||||
+ base::Value::Dict flags;
|
||||
+ base::DictValue flags;
|
||||
+ flags.Set("allow_remote_in_mcp", config.allow_remote_in_mcp);
|
||||
+ root.Set("flags", std::move(flags));
|
||||
+
|
||||
+ // instance
|
||||
+ base::Value::Dict instance;
|
||||
+ base::DictValue instance;
|
||||
+ instance.Set("install_id", config.identity.install_id);
|
||||
+ instance.Set("browseros_version", config.identity.browseros_version);
|
||||
+ instance.Set("chromium_version", config.identity.chromium_version);
|
||||
|
||||
@@ -2,7 +2,7 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
|
||||
index 90eec90d4ef45..da7beb4a4547e 100644
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -598,6 +598,7 @@
|
||||
@@ -613,6 +613,7 @@
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
@@ -10,7 +10,7 @@ index 90eec90d4ef45..da7beb4a4547e 100644
|
||||
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
|
||||
#include "chrome/browser/extensions/chrome_extension_cookies.h"
|
||||
#include "extensions/browser/api/web_request/web_request_api.h"
|
||||
@@ -1421,7 +1422,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
@@ -1449,7 +1450,7 @@ void ChromeContentBrowserClient::RegisterLocalStatePrefs(
|
||||
void ChromeContentBrowserClient::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
|
||||
@@ -19,7 +19,7 @@ index 90eec90d4ef45..da7beb4a4547e 100644
|
||||
// Register user prefs for mapping SitePerProcess and IsolateOrigins in
|
||||
// user policy in addition to the same named ones in Local State (which are
|
||||
// used for mapping the command-line flags).
|
||||
@@ -4884,6 +4885,43 @@ bool ChromeContentBrowserClient::
|
||||
@@ -4931,6 +4932,43 @@ bool ChromeContentBrowserClient::
|
||||
prefs.root_scrollbar_theme_color;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ index 90eec90d4ef45..da7beb4a4547e 100644
|
||||
void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
BrowserURLHandler* handler) {
|
||||
// The group policy NTP URL handler must be registered before the other NTP
|
||||
@@ -4900,6 +4938,13 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
@@ -4945,6 +4978,13 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
|
||||
handler->AddHandlerPair(&HandleChromeAboutAndChromeSyncRewrite,
|
||||
BrowserURLHandler::null_handler());
|
||||
|
||||
@@ -77,8 +77,8 @@ index 90eec90d4ef45..da7beb4a4547e 100644
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
// Handler to rewrite chrome://newtab on Android.
|
||||
handler->AddHandlerPair(&chrome::android::HandleAndroidNativePageURL,
|
||||
@@ -7693,6 +7738,15 @@ content::ContentBrowserClient::PrivateNetworkRequestPolicyOverride
|
||||
ChromeContentBrowserClient::ShouldOverridePrivateNetworkRequestPolicy(
|
||||
@@ -7775,6 +7820,15 @@ content::ContentBrowserClient::LocalNetworkAccessRequestPolicyOverride
|
||||
ChromeContentBrowserClient::ShouldOverrideLocalNetworkAccessRequestPolicy(
|
||||
content::BrowserContext* browser_context,
|
||||
const url::Origin& origin) {
|
||||
+#if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
|
||||
@@ -86,10 +86,10 @@ index 90eec90d4ef45..da7beb4a4547e 100644
|
||||
+ // This enables extension service workers to connect to local servers.
|
||||
+ if (origin.scheme() == extensions::kExtensionScheme &&
|
||||
+ browseros::IsBrowserOSExtension(origin.host())) {
|
||||
+ return PrivateNetworkRequestPolicyOverride::kForceAllow;
|
||||
+ return LocalNetworkAccessRequestPolicyOverride::kForceAllow;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
if (base::android::device_info::is_automotive()) {
|
||||
return content::ContentBrowserClient::PrivateNetworkRequestPolicyOverride::
|
||||
return content::ContentBrowserClient::
|
||||
|
||||
@@ -78,9 +78,9 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+namespace {
|
||||
+
|
||||
+// Serializes ui::AXNodeData to base::Value::Dict with all fields
|
||||
+base::Value::Dict SerializeAXNodeData(const ui::AXNodeData& node) {
|
||||
+ base::Value::Dict dict;
|
||||
+// Serializes ui::AXNodeData to base::DictValue with all fields
|
||||
+base::DictValue SerializeAXNodeData(const ui::AXNodeData& node) {
|
||||
+ base::DictValue dict;
|
||||
+
|
||||
+ // Core identity
|
||||
+ dict.Set("id", node.id);
|
||||
@@ -88,7 +88,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // Hierarchy
|
||||
+ if (!node.child_ids.empty()) {
|
||||
+ base::Value::List children;
|
||||
+ base::ListValue children;
|
||||
+ for (int32_t child_id : node.child_ids) {
|
||||
+ children.Append(child_id);
|
||||
+ }
|
||||
@@ -96,7 +96,7 @@ index 0000000000000..832e8d5471a78
|
||||
+ }
|
||||
+
|
||||
+ // State bitfield converted to string array
|
||||
+ base::Value::List states;
|
||||
+ base::ListValue states;
|
||||
+ for (int i = static_cast<int>(ax::mojom::State::kMinValue);
|
||||
+ i <= static_cast<int>(ax::mojom::State::kMaxValue); ++i) {
|
||||
+ auto state = static_cast<ax::mojom::State>(i);
|
||||
@@ -109,7 +109,7 @@ index 0000000000000..832e8d5471a78
|
||||
+ }
|
||||
+
|
||||
+ // Actions bitfield converted to string array
|
||||
+ base::Value::List actions;
|
||||
+ base::ListValue actions;
|
||||
+ for (int i = static_cast<int>(ax::mojom::Action::kMinValue);
|
||||
+ i <= static_cast<int>(ax::mojom::Action::kMaxValue); ++i) {
|
||||
+ auto action = static_cast<ax::mojom::Action>(i);
|
||||
@@ -123,7 +123,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // String attributes map with enum keys converted to strings
|
||||
+ if (node.string_attributes.size() > 0) {
|
||||
+ base::Value::Dict attrs;
|
||||
+ base::DictValue attrs;
|
||||
+ for (const auto& [key, value] : node.string_attributes) {
|
||||
+ attrs.Set(ui::ToString(key), value);
|
||||
+ }
|
||||
@@ -132,7 +132,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // Int attributes map
|
||||
+ if (node.int_attributes.size() > 0) {
|
||||
+ base::Value::Dict attrs;
|
||||
+ base::DictValue attrs;
|
||||
+ for (const auto& [key, value] : node.int_attributes) {
|
||||
+ attrs.Set(ui::ToString(key), value);
|
||||
+ }
|
||||
@@ -141,7 +141,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // Float attributes map
|
||||
+ if (node.float_attributes.size() > 0) {
|
||||
+ base::Value::Dict attrs;
|
||||
+ base::DictValue attrs;
|
||||
+ for (const auto& [key, value] : node.float_attributes) {
|
||||
+ attrs.Set(ui::ToString(key), static_cast<double>(value));
|
||||
+ }
|
||||
@@ -150,7 +150,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // Bool attributes map
|
||||
+ if (node.bool_attributes.Size() > 0) {
|
||||
+ base::Value::Dict attrs;
|
||||
+ base::DictValue attrs;
|
||||
+ node.bool_attributes.ForEach([&attrs](ax::mojom::BoolAttribute key, bool value) {
|
||||
+ attrs.Set(ui::ToString(key), value);
|
||||
+ });
|
||||
@@ -159,9 +159,9 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // IntList attributes map
|
||||
+ if (node.intlist_attributes.size() > 0) {
|
||||
+ base::Value::Dict attrs;
|
||||
+ base::DictValue attrs;
|
||||
+ for (const auto& [key, values] : node.intlist_attributes) {
|
||||
+ base::Value::List list;
|
||||
+ base::ListValue list;
|
||||
+ for (int v : values) {
|
||||
+ list.Append(v);
|
||||
+ }
|
||||
@@ -172,9 +172,9 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // StringList attributes map
|
||||
+ if (node.stringlist_attributes.size() > 0) {
|
||||
+ base::Value::Dict attrs;
|
||||
+ base::DictValue attrs;
|
||||
+ for (const auto& [key, values] : node.stringlist_attributes) {
|
||||
+ base::Value::List list;
|
||||
+ base::ListValue list;
|
||||
+ for (const auto& v : values) {
|
||||
+ list.Append(v);
|
||||
+ }
|
||||
@@ -185,7 +185,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // HTML attributes (name-value pairs)
|
||||
+ if (!node.html_attributes.empty()) {
|
||||
+ base::Value::Dict attrs;
|
||||
+ base::DictValue attrs;
|
||||
+ for (const auto& [name, value] : node.html_attributes) {
|
||||
+ attrs.Set(name, value);
|
||||
+ }
|
||||
@@ -195,9 +195,9 @@ index 0000000000000..832e8d5471a78
|
||||
+ return dict;
|
||||
+}
|
||||
+
|
||||
+// Serializes ui::AXTreeData to base::Value::Dict
|
||||
+base::Value::Dict SerializeAXTreeData(const ui::AXTreeData& tree_data) {
|
||||
+ base::Value::Dict dict;
|
||||
+// Serializes ui::AXTreeData to base::DictValue
|
||||
+base::DictValue SerializeAXTreeData(const ui::AXTreeData& tree_data) {
|
||||
+ base::DictValue dict;
|
||||
+
|
||||
+ // Document metadata
|
||||
+ if (!tree_data.title.empty()) {
|
||||
@@ -224,7 +224,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ // Selection
|
||||
+ if (tree_data.sel_anchor_object_id != -1) {
|
||||
+ base::Value::Dict selection;
|
||||
+ base::DictValue selection;
|
||||
+ selection.Set("anchorObjectId", tree_data.sel_anchor_object_id);
|
||||
+ selection.Set("anchorOffset", tree_data.sel_anchor_offset);
|
||||
+ selection.Set("focusObjectId", tree_data.sel_focus_object_id);
|
||||
@@ -323,7 +323,7 @@ index 0000000000000..832e8d5471a78
|
||||
+ result.root_id = tree_update.root_id;
|
||||
+
|
||||
+ // Serialize all nodes with complete AX data
|
||||
+ base::Value::Dict nodes;
|
||||
+ base::DictValue nodes;
|
||||
+ for (const auto& node_data : tree_update.nodes) {
|
||||
+ nodes.Set(base::NumberToString(node_data.id),
|
||||
+ SerializeAXNodeData(node_data));
|
||||
@@ -1129,7 +1129,7 @@ index 0000000000000..832e8d5471a78
|
||||
+ PrefService* local_state = g_browser_process->local_state();
|
||||
+
|
||||
+ // Build a combined browseros prefs dict from both sources
|
||||
+ base::Value::Dict combined_browseros;
|
||||
+ base::DictValue combined_browseros;
|
||||
+
|
||||
+ // Lambda to merge browseros prefs from a PrefService
|
||||
+ auto merge_prefs_from_service = [&](PrefService* prefs, const std::string& source_name) {
|
||||
@@ -1138,7 +1138,7 @@ index 0000000000000..832e8d5471a78
|
||||
+ }
|
||||
+
|
||||
+ // Get all preference values (returns nested Dict structure)
|
||||
+ base::Value::Dict pref_dict = prefs->GetPreferenceValues(
|
||||
+ base::DictValue pref_dict = prefs->GetPreferenceValues(
|
||||
+ PrefService::INCLUDE_DEFAULTS);
|
||||
+
|
||||
+ // Look for "browseros" key in the top-level dict
|
||||
@@ -1179,7 +1179,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+ if (params->properties.has_value()) {
|
||||
+ // The properties parameter is a Properties struct with additional_properties member
|
||||
+ base::Value::Dict properties = params->properties->additional_properties.Clone();
|
||||
+ base::DictValue properties = params->properties->additional_properties.Clone();
|
||||
+
|
||||
+ // Add extension ID as a property
|
||||
+ properties.Set("extension_id", extension_id());
|
||||
@@ -1441,7 +1441,7 @@ index 0000000000000..832e8d5471a78
|
||||
+
|
||||
+void BrowserOSChoosePathFunction::FileSelectionCanceled() {
|
||||
+ // Return null to indicate cancellation (not an error)
|
||||
+ base::Value::List results;
|
||||
+ base::ListValue results;
|
||||
+ results.Append(base::Value());
|
||||
+ Respond(ArgumentList(std::move(results)));
|
||||
+ Release();
|
||||
|
||||
@@ -2,7 +2,7 @@ diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/bro
|
||||
index fb3182b3a431c..d63fbc9af10c6 100644
|
||||
--- a/chrome/browser/extensions/updater/extension_updater.cc
|
||||
+++ b/chrome/browser/extensions/updater/extension_updater.cc
|
||||
@@ -610,6 +610,86 @@ void ExtensionUpdater::CheckNow(CheckParams params) {
|
||||
@@ -629,7 +629,89 @@ void ExtensionUpdater::CheckNow(CheckParams params) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,10 +56,12 @@ index fb3182b3a431c..d63fbc9af10c6 100644
|
||||
+ id, info->update_url(), info->install_source(),
|
||||
+ is_corrupt_reinstall, request_id, params.fetch_priority))) {
|
||||
+ request.in_progress_ids.insert(id);
|
||||
+ InstallStageTracker::Get(profile_)->ReportInstallationStage(
|
||||
+ id, InstallStageTracker::Stage::DOWNLOADING);
|
||||
+ InstallStageTrackerFactory::GetForBrowserContext(profile_)
|
||||
+ ->ReportInstallationStage(
|
||||
+ id, InstallStageTracker::Stage::DOWNLOADING);
|
||||
+ } else {
|
||||
+ InstallStageTracker::Get(profile_)->ReportFailure(
|
||||
+ InstallStageTrackerFactory::GetForBrowserContext(profile_)
|
||||
+ ->ReportFailure(
|
||||
+ id, InstallStageTracker::FailureReason::DOWNLOADER_ADD_FAILED);
|
||||
+ }
|
||||
+ }
|
||||
@@ -88,4 +90,5 @@ index fb3182b3a431c..d63fbc9af10c6 100644
|
||||
+
|
||||
void ExtensionUpdater::OnExtensionDownloadStageChanged(const ExtensionId& id,
|
||||
Stage stage) {
|
||||
InstallStageTracker::Get(profile_)->ReportDownloadingStage(id, stage);
|
||||
InstallStageTrackerFactory::GetForBrowserContext(profile_)
|
||||
->ReportDownloadingStage(id, stage);
|
||||
|
||||
@@ -43,7 +43,7 @@ index 62546b572bab8..3f4082edf8aa9 100644
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ std::optional<base::Value::Dict> preferences =
|
||||
+ std::optional<base::DictValue> preferences =
|
||||
+ base::JSONReader::ReadDict(preferences_content, base::JSON_PARSE_CHROMIUM_EXTENSIONS);
|
||||
+ if (!preferences) {
|
||||
+ LOG(INFO) << "browseros: Failed to parse preferences file as JSON: " << preferences_path.AsUTF8Unsafe();
|
||||
@@ -51,7 +51,7 @@ index 62546b572bab8..3f4082edf8aa9 100644
|
||||
+ }
|
||||
+
|
||||
+ // Extensions are stored in extensions.settings in Chrome preferences
|
||||
+ const base::Value::Dict* extensions_dict =
|
||||
+ const base::DictValue* extensions_dict =
|
||||
+ preferences->FindDictByDottedPath("extensions.settings");
|
||||
+ if (!extensions_dict) {
|
||||
+ LOG(INFO) << "browseros: No extensions.settings found in preferences file";
|
||||
@@ -68,7 +68,7 @@ index 62546b572bab8..3f4082edf8aa9 100644
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict& dict = value.GetDict();
|
||||
+ const base::DictValue& dict = value.GetDict();
|
||||
+
|
||||
+ // Only count if:
|
||||
+ // 1. It's from the Chrome Web Store
|
||||
@@ -132,8 +132,8 @@ index 62546b572bab8..3f4082edf8aa9 100644
|
||||
+ return *services != user_data_importer::NONE;
|
||||
+}
|
||||
+
|
||||
+base::Value::List GetChromeSourceProfiles(const base::FilePath& local_state_path) {
|
||||
+ base::Value::List profiles;
|
||||
+base::ListValue GetChromeSourceProfiles(const base::FilePath& local_state_path) {
|
||||
+ base::ListValue profiles;
|
||||
+
|
||||
+ if (base::PathExists(local_state_path)) {
|
||||
+ std::string local_state_content;
|
||||
@@ -141,7 +141,7 @@ index 62546b572bab8..3f4082edf8aa9 100644
|
||||
+ return profiles;
|
||||
+ }
|
||||
+
|
||||
+ std::optional<base::Value::Dict> local_state_dict =
|
||||
+ std::optional<base::DictValue> local_state_dict =
|
||||
+ base::JSONReader::ReadDict(local_state_content, base::JSON_PARSE_CHROMIUM_EXTENSIONS);
|
||||
+
|
||||
+ if (local_state_dict) {
|
||||
@@ -158,7 +158,7 @@ index 62546b572bab8..3f4082edf8aa9 100644
|
||||
+ if (!name)
|
||||
+ continue;
|
||||
+
|
||||
+ base::Value::Dict entry;
|
||||
+ base::DictValue entry;
|
||||
+ entry.Set("id", value.first);
|
||||
+ entry.Set("name", *name);
|
||||
+ profiles.Append(std::move(entry));
|
||||
@@ -170,7 +170,7 @@ index 62546b572bab8..3f4082edf8aa9 100644
|
||||
+
|
||||
+ // If no profiles were found, add the default one
|
||||
+ if (profiles.empty()) {
|
||||
+ base::Value::Dict entry;
|
||||
+ base::DictValue entry;
|
||||
+ entry.Set("id", "Default");
|
||||
+ entry.Set("name", "Default");
|
||||
+ profiles.Append(std::move(entry));
|
||||
@@ -189,7 +189,7 @@ index 62546b572bab8..3f4082edf8aa9 100644
|
||||
+
|
||||
+ // Get the list of profiles from Local State
|
||||
+ base::FilePath local_state_path = chrome_path.Append(FILE_PATH_LITERAL("Local State"));
|
||||
+ base::Value::List chrome_profiles = GetChromeSourceProfiles(local_state_path);
|
||||
+ base::ListValue chrome_profiles = GetChromeSourceProfiles(local_state_path);
|
||||
+
|
||||
+ // Add each profile
|
||||
+ for (const auto& value : chrome_profiles) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
diff --git a/chrome/browser/resources/settings/BUILD.gn b/chrome/browser/resources/settings/BUILD.gn
|
||||
index 04b2069bd3bdb..668e28cba8c4f 100644
|
||||
index 01bd4cfbf9588..d841ee105b7b6 100644
|
||||
--- a/chrome/browser/resources/settings/BUILD.gn
|
||||
+++ b/chrome/browser/resources/settings/BUILD.gn
|
||||
@@ -59,6 +59,7 @@ build_webui("build") {
|
||||
@@ -57,6 +57,7 @@ build_webui("build") {
|
||||
"a11y_page/a11y_page.ts",
|
||||
"a11y_page/a11y_page_index.ts",
|
||||
"about_page/about_page.ts",
|
||||
+ "browseros_prefs_page/browseros_prefs_page.ts",
|
||||
"ai_page/ai_compare_subpage.ts",
|
||||
"ai_page/ai_info_card.ts",
|
||||
"ai_page/ai_logging_info_bullet.ts",
|
||||
"ai_page/ai_page.ts",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
diff --git a/chrome/browser/resources/settings/settings_menu/settings_menu.html b/chrome/browser/resources/settings/settings_menu/settings_menu.html
|
||||
index 436249d603479..27809f00841c7 100644
|
||||
index 3cb9e3af7a315..9c955495399f9 100644
|
||||
--- a/chrome/browser/resources/settings/settings_menu/settings_menu.html
|
||||
+++ b/chrome/browser/resources/settings/settings_menu/settings_menu.html
|
||||
@@ -67,6 +67,12 @@
|
||||
$i18n{yourSavedInfoPageTitle}
|
||||
@@ -57,6 +57,12 @@
|
||||
$i18n{peoplePageTitle}
|
||||
<cr-ripple></cr-ripple>
|
||||
</a>
|
||||
+ <!-- <a role="menuitem" id="browseros-prefs-menu" href="/browseros-settings" -->
|
||||
@@ -13,5 +13,5 @@ index 436249d603479..27809f00841c7 100644
|
||||
+ <!-- <cr-ripple></cr-ripple> -->
|
||||
+ <!-- </a> -->
|
||||
<a role="menuitem" id="autofill" href="/autofill"
|
||||
hidden="[[!showAutofillPageMenuItem_(
|
||||
enableYourSavedInfoSettingsPage_,
|
||||
on-click="onAutofillClick_"
|
||||
class="cr-nav-menu-item"
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
diff --git a/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc b/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
|
||||
index cb73087d9476d..14a8d978660dc 100644
|
||||
index 5ebd4dfda0200..ec77943380577 100644
|
||||
--- a/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
|
||||
+++ b/chrome/browser/sync/prefs/chrome_syncable_prefs_database.cc
|
||||
@@ -436,6 +436,9 @@ enum {
|
||||
kPinContextualTaskButton = 100369,
|
||||
kAccessibilityReadAnythingOmniboxChipIgnoredCount = 100370,
|
||||
kAccessibilityReadAnythingLineFocus = 100371,
|
||||
@@ -443,6 +443,9 @@ enum {
|
||||
kDesktopToiOSPriceTrackingPromoLastImpressionTimestamp = 100376,
|
||||
kDesktopToiOSPriceTrackingPromoImpressionsCounter = 100377,
|
||||
kDesktopToiOSPriceTrackingPromoOptOut = 100378,
|
||||
+ // BrowserOS: sync pref IDs
|
||||
+ kPinnedThirdPartyLlmMigrationComplete = 100372,
|
||||
+ kPinnedClashOfGptsMigrationComplete = 100373,
|
||||
+ kPinnedThirdPartyLlmMigrationComplete = 100379,
|
||||
+ kPinnedClashOfGptsMigrationComplete = 100380,
|
||||
// See components/sync_preferences/README.md about adding new entries here.
|
||||
// vvvvv IMPORTANT! vvvvv
|
||||
// Note to the reviewer: IT IS YOUR RESPONSIBILITY to ensure that new syncable
|
||||
@@ -636,6 +639,14 @@ constexpr auto kChromeSyncablePrefsAllowlist = base::MakeFixedFlatMap<
|
||||
{syncable_prefs_ids::kVerticalTabsEnabled, syncer::PREFERENCES,
|
||||
@@ -643,6 +646,14 @@ constexpr auto kChromeSyncablePrefsAllowlist = base::MakeFixedFlatMap<
|
||||
{syncable_prefs_ids::kProjectsPanelEntrypointEnabled, syncer::PREFERENCES,
|
||||
sync_preferences::PrefSensitivity::kNone,
|
||||
sync_preferences::MergeBehavior::kNone}},
|
||||
+ {prefs::kPinnedThirdPartyLlmMigrationComplete,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
|
||||
index 0589bacba844a..14bc76e5475f0 100644
|
||||
index 0c89bb8539af6..209620f3f0f9a 100644
|
||||
--- a/chrome/browser/themes/theme_service.cc
|
||||
+++ b/chrome/browser/themes/theme_service.cc
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -13,8 +13,22 @@ index 0589bacba844a..14bc76e5475f0 100644
|
||||
@@ -265,6 +266,7 @@ ThemeService::~ThemeService() = default;
|
||||
void ThemeService::Init() {
|
||||
theme_helper_->DCheckCalledOnValidSequence();
|
||||
|
||||
|
||||
+ browseros::SyncDefaultTheme(profile_->GetPrefs());
|
||||
InitFromPrefs();
|
||||
|
||||
|
||||
// ThemeObserver should be constructed before calling
|
||||
@@ -272,11 +274,11 @@ void ThemeService::RegisterProfilePrefs(
|
||||
SK_ColorTRANSPARENT);
|
||||
registry->RegisterIntegerPref(
|
||||
prefs::kDeprecatedBrowserColorSchemeDoNotUse,
|
||||
- static_cast<int>(ThemeService::BrowserColorScheme::kSystem),
|
||||
+ static_cast<int>(ThemeService::BrowserColorScheme::kLight),
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterIntegerPref(
|
||||
prefs::kBrowserColorScheme,
|
||||
- static_cast<int>(ThemeService::BrowserColorScheme::kSystem));
|
||||
+ static_cast<int>(ThemeService::BrowserColorScheme::kLight));
|
||||
registry->RegisterIntegerPref(
|
||||
prefs::kDeprecatedUserColorDoNotUse, SK_ColorTRANSPARENT,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc
|
||||
index 8634cbb4dc17a..3bd0aec1c7095 100644
|
||||
--- a/chrome/browser/themes/theme_service_factory.cc
|
||||
+++ b/chrome/browser/themes/theme_service_factory.cc
|
||||
@@ -131,11 +131,11 @@ void ThemeServiceFactory::RegisterProfilePrefs(
|
||||
SK_ColorTRANSPARENT);
|
||||
registry->RegisterIntegerPref(
|
||||
prefs::kDeprecatedBrowserColorSchemeDoNotUse,
|
||||
- static_cast<int>(ThemeService::BrowserColorScheme::kSystem),
|
||||
+ static_cast<int>(ThemeService::BrowserColorScheme::kLight),
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
registry->RegisterIntegerPref(
|
||||
prefs::kBrowserColorScheme,
|
||||
- static_cast<int>(ThemeService::BrowserColorScheme::kSystem));
|
||||
+ static_cast<int>(ThemeService::BrowserColorScheme::kLight));
|
||||
registry->RegisterIntegerPref(
|
||||
prefs::kDeprecatedUserColorDoNotUse, SK_ColorTRANSPARENT,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
@@ -1,28 +1,28 @@
|
||||
diff --git a/chrome/browser/ui/tabs/vertical_tab_strip_state_controller.cc b/chrome/browser/ui/tabs/vertical_tab_strip_state_controller.cc
|
||||
index 9ddd7c784c3f2..c80cff3197880 100644
|
||||
index c96a73b395c59..cbc1ef080c91d 100644
|
||||
--- a/chrome/browser/ui/tabs/vertical_tab_strip_state_controller.cc
|
||||
+++ b/chrome/browser/ui/tabs/vertical_tab_strip_state_controller.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "base/i18n/rtl.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/to_string.h"
|
||||
+#include "chrome/browser/browseros/core/browseros_prefs.h"
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/sessions/session_service.h"
|
||||
#include "chrome/browser/sessions/session_service_factory.h"
|
||||
@@ -43,6 +44,8 @@ VerticalTabStripStateController::VerticalTabStripStateController(
|
||||
@@ -45,6 +46,8 @@ VerticalTabStripStateController::VerticalTabStripStateController(
|
||||
browser_window_(browser_window),
|
||||
scoped_unowned_user_data_(browser_window->GetUnownedUserDataHost(),
|
||||
*this) {
|
||||
+ browseros::SyncVerticalTabsPref(pref_service_);
|
||||
+
|
||||
pref_change_registrar_.Init(pref_service_);
|
||||
|
||||
|
||||
pref_change_registrar_.Add(
|
||||
@@ -50,6 +53,16 @@ VerticalTabStripStateController::VerticalTabStripStateController(
|
||||
base::BindRepeating(&VerticalTabStripStateController::NotifyStateChanged,
|
||||
@@ -52,6 +55,16 @@ VerticalTabStripStateController::VerticalTabStripStateController(
|
||||
base::BindRepeating(&VerticalTabStripStateController::NotifyModeChanged,
|
||||
base::Unretained(this)));
|
||||
|
||||
|
||||
+ pref_change_registrar_.Add(
|
||||
+ browseros::prefs::kVerticalTabsEnabled,
|
||||
+ base::BindRepeating(
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/chrome/browser/ui/toolbar/toolbar_actions_model.cc b/chrome/browser/ui/toolbar/toolbar_actions_model.cc
|
||||
index e0ac63141989c..067446bb2a571 100644
|
||||
index 89c4445bf4185..39f22a4571f8e 100644
|
||||
--- a/chrome/browser/ui/toolbar/toolbar_actions_model.cc
|
||||
+++ b/chrome/browser/ui/toolbar/toolbar_actions_model.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "base/one_shot_event.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@@ -10,7 +10,7 @@ index e0ac63141989c..067446bb2a571 100644
|
||||
#include "chrome/browser/extensions/extension_management.h"
|
||||
#include "chrome/browser/extensions/extension_tab_util.h"
|
||||
#include "chrome/browser/extensions/managed_toolbar_pin_mode.h"
|
||||
@@ -323,6 +324,11 @@ bool ToolbarActionsModel::IsActionPinned(const ActionId& action_id) const {
|
||||
@@ -383,6 +384,11 @@ bool ToolbarActionsModel::IsActionPinned(const ActionId& action_id) const {
|
||||
}
|
||||
|
||||
bool ToolbarActionsModel::IsActionForcePinned(const ActionId& action_id) const {
|
||||
@@ -18,22 +18,22 @@ index e0ac63141989c..067446bb2a571 100644
|
||||
+ if (browseros::IsBrowserOSPinnedExtension(action_id)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
auto* management =
|
||||
extensions::ExtensionManagementFactory::GetForBrowserContext(profile_);
|
||||
return base::Contains(management->GetForcePinnedList(), action_id);
|
||||
@@ -565,6 +571,14 @@ ToolbarActionsModel::GetFilteredPinnedActionIds() const {
|
||||
std::ranges::copy_if(
|
||||
management->GetForcePinnedList(), std::back_inserter(pinned),
|
||||
[&pinned](const std::string& id) { return !base::Contains(pinned, id); });
|
||||
+
|
||||
return management->GetForcePinnedList().contains(action_id);
|
||||
@@ -628,6 +634,14 @@ ToolbarActionsModel::GetFilteredPinnedActionIds() const {
|
||||
return !std::ranges::contains(pinned, id);
|
||||
});
|
||||
|
||||
+ // Add BrowserOS extensions to the force-pinned list (only those marked as pinned)
|
||||
+ for (const std::string& ext_id : browseros::GetBrowserOSExtensionIds()) {
|
||||
+ if (browseros::IsBrowserOSPinnedExtension(ext_id) &&
|
||||
+ !base::Contains(pinned, ext_id)) {
|
||||
+ !std::ranges::contains(pinned, ext_id)) {
|
||||
+ pinned.push_back(ext_id);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+
|
||||
// TODO(pbos): Make sure that the pinned IDs are pruned from ExtensionPrefs on
|
||||
// startup so that we don't keep saving stale IDs.
|
||||
std::vector<ActionId> filtered_action_ids;
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
diff --git a/chrome/browser/ui/toolbar/toolbar_pref_names.cc b/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
index 2ac0c02e74ee0..d2868cb83608f 100644
|
||||
index b0e7b69174614..7222762073203 100644
|
||||
--- a/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
+++ b/chrome/browser/ui/toolbar/toolbar_pref_names.cc
|
||||
@@ -4,8 +4,10 @@
|
||||
@@ -4,8 +4,11 @@
|
||||
|
||||
#include "chrome/browser/ui/toolbar/toolbar_pref_names.h"
|
||||
|
||||
+#include "base/feature_list.h"
|
||||
#include "chrome/browser/ui/actions/chrome_action_id.h"
|
||||
#include "chrome/browser/ui/ui_features.h"
|
||||
#include "chrome/browser/ui/tab_search_feature.h"
|
||||
+#include "chrome/browser/ui/ui_features.h"
|
||||
+#include "chrome/common/chrome_features.h"
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_registry_simple.h"
|
||||
#include "ui/actions/actions.h"
|
||||
@@ -14,14 +16,7 @@ namespace toolbar {
|
||||
@@ -14,14 +17,7 @@ namespace toolbar {
|
||||
|
||||
void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
base::Value::List default_pinned_actions;
|
||||
base::ListValue default_pinned_actions;
|
||||
- const std::optional<std::string>& chrome_labs_action =
|
||||
- actions::ActionIdMap::ActionIdToString(kActionShowChromeLabs);
|
||||
- // ActionIdToStringMappings are not initialized in unit tests, therefore will
|
||||
@@ -29,7 +30,7 @@ index 2ac0c02e74ee0..d2868cb83608f 100644
|
||||
|
||||
if (features::HasTabSearchToolbarButton()) {
|
||||
const std::optional<std::string>& tab_search_action =
|
||||
@@ -31,6 +26,24 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -31,6 +27,24 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +55,7 @@ index 2ac0c02e74ee0..d2868cb83608f 100644
|
||||
registry->RegisterListPref(prefs::kPinnedActions,
|
||||
std::move(default_pinned_actions),
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
@@ -46,6 +59,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -46,6 +60,12 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kTabSearchMigrationComplete, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc
|
||||
index 8e70b4d6c09a8..f63de4c04083c 100644
|
||||
index 45501ce4b433d..347348bcc362d 100644
|
||||
--- a/chrome/browser/ui/ui_features.cc
|
||||
+++ b/chrome/browser/ui/ui_features.cc
|
||||
@@ -115,6 +115,14 @@ BASE_FEATURE(kPopupBrowserUseNewLayout, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
@@ -126,6 +126,14 @@ BASE_FEATURE(kSideBySide, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
BASE_FEATURE(kTabbedBrowserUseNewLayout, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
BASE_FEATURE(kSideBySideLinkMenuNewBadge, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
+BASE_FEATURE(kThirdPartyLlmPanel,
|
||||
+ "ThirdPartyLlmPanel",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
diff --git a/chrome/browser/ui/ui_features.h b/chrome/browser/ui/ui_features.h
|
||||
index 2bedb1e230459..f779499960910 100644
|
||||
index 43f876760f130..a1ed839eae250 100644
|
||||
--- a/chrome/browser/ui/ui_features.h
|
||||
+++ b/chrome/browser/ui/ui_features.h
|
||||
@@ -161,6 +161,10 @@ BASE_DECLARE_FEATURE(kPopupBrowserUseNewLayout);
|
||||
@@ -156,6 +156,10 @@ BASE_DECLARE_FEATURE(kSideBySide);
|
||||
|
||||
BASE_DECLARE_FEATURE(kTabbedBrowserUseNewLayout);
|
||||
BASE_DECLARE_FEATURE(kSideBySideLinkMenuNewBadge);
|
||||
|
||||
+// BrowserOS: feature declarations
|
||||
+BASE_DECLARE_FEATURE(kThirdPartyLlmPanel);
|
||||
|
||||
@@ -175,7 +175,7 @@ index 0000000000000..9e1c6dc9fe8a1
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::List& providers_list = prefs->GetList(kThirdPartyLlmProvidersPref);
|
||||
+ const base::ListValue& providers_list = prefs->GetList(kThirdPartyLlmProvidersPref);
|
||||
+
|
||||
+ providers_.clear();
|
||||
+
|
||||
@@ -439,7 +439,7 @@ index 0000000000000..9e1c6dc9fe8a1
|
||||
+ }
|
||||
+
|
||||
+ // Load provider selections (indices)
|
||||
+ const base::Value::List& providers_list = prefs->GetList(kClashOfGptsPaneProvidersPref);
|
||||
+ const base::ListValue& providers_list = prefs->GetList(kClashOfGptsPaneProvidersPref);
|
||||
+ if (providers_list.size() > 0) {
|
||||
+ for (size_t i = 0; i < providers_list.size() && i < kMaxPanes; ++i) {
|
||||
+ if (providers_list[i].is_int()) {
|
||||
@@ -452,7 +452,7 @@ index 0000000000000..9e1c6dc9fe8a1
|
||||
+ }
|
||||
+
|
||||
+ // Load last URLs
|
||||
+ const base::Value::Dict& urls_dict = prefs->GetDict(kClashOfGptsLastUrlsPref);
|
||||
+ const base::DictValue& urls_dict = prefs->GetDict(kClashOfGptsLastUrlsPref);
|
||||
+ for (const auto [key, value] : urls_dict) {
|
||||
+ if (const std::string* url_str = value.GetIfString()) {
|
||||
+ // Parse key format "pane_provider" safely without sscanf
|
||||
|
||||
@@ -430,7 +430,7 @@ index 0000000000000..9eea7f83e53dd
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::List& providers_list = prefs->GetList(kThirdPartyLlmProvidersPref);
|
||||
+ const base::ListValue& providers_list = prefs->GetList(kThirdPartyLlmProvidersPref);
|
||||
+
|
||||
+ providers_.clear();
|
||||
+
|
||||
@@ -490,10 +490,10 @@ index 0000000000000..9eea7f83e53dd
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ base::Value::List providers_list;
|
||||
+ base::ListValue providers_list;
|
||||
+
|
||||
+ for (const auto& provider : providers_) {
|
||||
+ base::Value::Dict provider_dict;
|
||||
+ base::DictValue provider_dict;
|
||||
+ provider_dict.Set("name", base::UTF16ToUTF8(provider.name));
|
||||
+ provider_dict.Set("url", provider.url.spec());
|
||||
+ providers_list.Append(std::move(provider_dict));
|
||||
|
||||
@@ -28,7 +28,7 @@ index 0000000000000..d043fcba5a32c
|
||||
+}
|
||||
+
|
||||
+void BrowserOSMetricsHandler::HandleLogBrowserOSMetric(
|
||||
+ const base::Value::List& args) {
|
||||
+ const base::ListValue& args) {
|
||||
+ if (args.size() < 1 || !args[0].is_string()) {
|
||||
+ LOG(WARNING) << "browseros: Invalid metric event name";
|
||||
+ return;
|
||||
@@ -39,7 +39,7 @@ index 0000000000000..d043fcba5a32c
|
||||
+ if (args.size() > 1) {
|
||||
+ // Has properties
|
||||
+ if (args[1].is_dict()) {
|
||||
+ base::Value::Dict properties = args[1].GetDict().Clone();
|
||||
+ base::DictValue properties = args[1].GetDict().Clone();
|
||||
+ browseros_metrics::BrowserOSMetrics::Log(event_name, std::move(properties));
|
||||
+ } else {
|
||||
+ LOG(WARNING) << "browseros: Invalid metric properties format";
|
||||
|
||||
@@ -33,7 +33,7 @@ index 0000000000000..dfcb0485c0432
|
||||
+
|
||||
+ private:
|
||||
+ // Handler for logBrowserOSMetric message from JavaScript
|
||||
+ void HandleLogBrowserOSMetric(const base::Value::List& args);
|
||||
+ void HandleLogBrowserOSMetric(const base::ListValue& args);
|
||||
+
|
||||
+ // SettingsPageUIHandler:
|
||||
+ void OnJavascriptAllowed() override;
|
||||
|
||||
@@ -2,7 +2,7 @@ diff --git a/chrome/browser/ui/webui/settings/import_data_handler.cc b/chrome/br
|
||||
index 1e4ecb4f71569..b1752309fecca 100644
|
||||
--- a/chrome/browser/ui/webui/settings/import_data_handler.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/import_data_handler.cc
|
||||
@@ -146,6 +146,12 @@ void ImportDataHandler::HandleImportData(const base::Value::List& args) {
|
||||
@@ -146,6 +146,12 @@ void ImportDataHandler::HandleImportData(const base::ListValue& args) {
|
||||
if (*type_dict.FindBool(prefs::kImportDialogSearchEngine)) {
|
||||
selected_items |= user_data_importer::SEARCH_ENGINES;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
diff --git a/chrome/common/extensions/api/api_sources.gni b/chrome/common/extensions/api/api_sources.gni
|
||||
index 11358cf8b2d77..e147bedfa8744 100644
|
||||
index 1bb3d09f4bf2c..1c391647f5345 100644
|
||||
--- a/chrome/common/extensions/api/api_sources.gni
|
||||
+++ b/chrome/common/extensions/api/api_sources.gni
|
||||
@@ -70,6 +70,7 @@ if (enable_extensions) {
|
||||
@@ -80,6 +80,7 @@ if (enable_extensions) {
|
||||
"autotest_private.idl",
|
||||
"bookmark_manager_private.json",
|
||||
"braille_display_private.idl",
|
||||
+ "browser_os.idl",
|
||||
"chrome_web_view_internal.json",
|
||||
"command_line_private.json",
|
||||
"content_settings.json",
|
||||
"crash_report_private.idl",
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
diff --git a/chrome/install_static/chromium_install_modes.cc b/chrome/install_static/chromium_install_modes.cc
|
||||
index f5af44ca1c489..62378ff18683c 100644
|
||||
--- a/chrome/install_static/chromium_install_modes.cc
|
||||
+++ b/chrome/install_static/chromium_install_modes.cc
|
||||
@@ -12,12 +12,12 @@
|
||||
|
||||
namespace install_static {
|
||||
|
||||
-const wchar_t kCompanyPathName[] = L"";
|
||||
+const wchar_t kCompanyPathName[] = L"BrowserOS";
|
||||
|
||||
-const wchar_t kProductPathName[] = L"Chromium";
|
||||
+const wchar_t kProductPathName[] = L"BrowserOS";
|
||||
|
||||
const size_t kProductPathNameLength = _countof(kProductPathName) - 1;
|
||||
|
||||
-const char kSafeBrowsingName[] = "chromium";
|
||||
+const char kSafeBrowsingName[] = "browseros";
|
||||
|
||||
} // namespace install_static
|
||||
@@ -41,7 +41,7 @@ index 0000000000000..e631448aa5137
|
||||
+using FaviconMap = std::map<int64_t, std::set<GURL>>;
|
||||
+
|
||||
+void RecursiveReadBookmarksFolder(
|
||||
+ const base::Value::Dict* folder,
|
||||
+ const base::DictValue* folder,
|
||||
+ const std::vector<std::u16string>& parent_path,
|
||||
+ bool is_in_toolbar,
|
||||
+ std::vector<user_data_importer::ImportedBookmarkEntry>* bookmarks) {
|
||||
@@ -49,7 +49,7 @@ index 0000000000000..e631448aa5137
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::List* children = folder->FindList("children");
|
||||
+ const base::ListValue* children = folder->FindList("children");
|
||||
+ if (!children) {
|
||||
+ return;
|
||||
+ }
|
||||
@@ -59,7 +59,7 @@ index 0000000000000..e631448aa5137
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict& item = value.GetDict();
|
||||
+ const base::DictValue& item = value.GetDict();
|
||||
+ const std::string* type = item.FindString("type");
|
||||
+ if (!type) {
|
||||
+ continue;
|
||||
@@ -79,7 +79,7 @@ index 0000000000000..e631448aa5137
|
||||
+ path.push_back(title);
|
||||
+
|
||||
+ // Add empty folders as bookmark entries
|
||||
+ const base::Value::List* inner_children = item.FindList("children");
|
||||
+ const base::ListValue* inner_children = item.FindList("children");
|
||||
+ if (inner_children && inner_children->empty()) {
|
||||
+ user_data_importer::ImportedBookmarkEntry entry;
|
||||
+ entry.is_folder = true;
|
||||
@@ -198,14 +198,14 @@ index 0000000000000..e631448aa5137
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict* roots = bookmarks_value->GetDict().FindDict("roots");
|
||||
+ const base::DictValue* roots = bookmarks_value->GetDict().FindDict("roots");
|
||||
+ if (!roots) {
|
||||
+ LOG(WARNING) << "browseros: No roots in Bookmarks";
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ // Import bookmark bar
|
||||
+ const base::Value::Dict* bookmark_bar = roots->FindDict("bookmark_bar");
|
||||
+ const base::DictValue* bookmark_bar = roots->FindDict("bookmark_bar");
|
||||
+ if (bookmark_bar) {
|
||||
+ std::vector<std::u16string> path;
|
||||
+ const std::string* name = bookmark_bar->FindString("name");
|
||||
@@ -215,7 +215,7 @@ index 0000000000000..e631448aa5137
|
||||
+ }
|
||||
+
|
||||
+ // Import other bookmarks
|
||||
+ const base::Value::Dict* other = roots->FindDict("other");
|
||||
+ const base::DictValue* other = roots->FindDict("other");
|
||||
+ if (other) {
|
||||
+ std::vector<std::u16string> path;
|
||||
+ const std::string* name = other->FindString("name");
|
||||
|
||||
@@ -59,8 +59,8 @@ index 0000000000000..c56a27b698eda
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict& dict = parsed->GetDict();
|
||||
+ const base::Value::Dict* os_crypt = dict.FindDict("os_crypt");
|
||||
+ const base::DictValue& dict = parsed->GetDict();
|
||||
+ const base::DictValue* os_crypt = dict.FindDict("os_crypt");
|
||||
+ if (!os_crypt) {
|
||||
+ LOG(WARNING) << "browseros: No os_crypt section in Local State";
|
||||
+ return false;
|
||||
|
||||
@@ -31,7 +31,7 @@ index 0000000000000..521ceadec9fc9
|
||||
+ return extension_ids;
|
||||
+ }
|
||||
+
|
||||
+ std::optional<base::Value::Dict> preferences = base::JSONReader::ReadDict(
|
||||
+ std::optional<base::DictValue> preferences = base::JSONReader::ReadDict(
|
||||
+ preferences_content, base::JSON_PARSE_CHROMIUM_EXTENSIONS);
|
||||
+ if (!preferences) {
|
||||
+ LOG(WARNING) << "browseros: Failed to parse JSON from "
|
||||
@@ -39,7 +39,7 @@ index 0000000000000..521ceadec9fc9
|
||||
+ return extension_ids;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict* extensions_dict =
|
||||
+ const base::DictValue* extensions_dict =
|
||||
+ preferences->FindDictByDottedPath("extensions.settings");
|
||||
+ if (!extensions_dict) {
|
||||
+ return extension_ids;
|
||||
@@ -50,7 +50,7 @@ index 0000000000000..521ceadec9fc9
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ const base::Value::Dict& dict = value.GetDict();
|
||||
+ const base::DictValue& dict = value.GetDict();
|
||||
+
|
||||
+ // Skip default-installed extensions
|
||||
+ if (dict.FindBool("was_installed_by_default").value_or(false)) {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
diff --git a/components/infobars/core/infobar_delegate.h b/components/infobars/core/infobar_delegate.h
|
||||
index 62247f8d82ca6..5bc23ffd73d95 100644
|
||||
index 4f9cd9e57e3bb..862516ac3724b 100644
|
||||
--- a/components/infobars/core/infobar_delegate.h
|
||||
+++ b/components/infobars/core/infobar_delegate.h
|
||||
@@ -212,6 +212,8 @@ class InfoBarDelegate {
|
||||
SESSION_RESTORE_INFOBAR_DELEGATE = 128,
|
||||
@@ -213,6 +213,8 @@ class InfoBarDelegate {
|
||||
ROLL_BACK_MODE_B_INFOBAR_DELEGATE = 129,
|
||||
DEV_TOOLS_REMOTE_DEBUGGING_INFOBAR_DELEGATE = 130,
|
||||
STARTUP_LAUNCH_INFOBAR_DELEGATE = 131,
|
||||
+ // BrowserOS: agent installation infobar
|
||||
+ BROWSEROS_AGENT_INSTALLING_INFOBAR_DELEGATE = 131,
|
||||
+ BROWSEROS_AGENT_INSTALLING_INFOBAR_DELEGATE = 132,
|
||||
};
|
||||
// LINT.ThenChange(//tools/metrics/histograms/metadata/browser/enums.xml:InfoBarIdentifier)
|
||||
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
diff --git a/extensions/browser/extension_function_histogram_value.h b/extensions/browser/extension_function_histogram_value.h
|
||||
index ef1e808e09269..0d8e46d362f80 100644
|
||||
index 2a2f2e26757cc..61daa201a826a 100644
|
||||
--- a/extensions/browser/extension_function_histogram_value.h
|
||||
+++ b/extensions/browser/extension_function_histogram_value.h
|
||||
@@ -2017,6 +2017,32 @@ enum HistogramValue {
|
||||
WEBSTOREPRIVATE_SHOULDSHOWENTERPRISEPROMOTIONBANNER = 1954,
|
||||
WEBSTOREPRIVATE_LOGENTERPRISEPROMOSHOWN = 1955,
|
||||
WEBSTOREPRIVATE_ONENTERPRISEPROMOCLICK = 1956,
|
||||
@@ -2021,6 +2021,32 @@ enum HistogramValue {
|
||||
AUTOFILLPRIVATE_TOGGLEAUTOFILLAIREAUTHREQUIREMENT = 1958,
|
||||
AUTOFILLPRIVATE_GETREQUIREDATTRIBUTETYPESFORENTITYTYPENAME = 1959,
|
||||
PDFVIEWERPRIVATE_GLICSUMMARIZE = 1960,
|
||||
+ // BrowserOS: extension function histogram values
|
||||
+ BROWSER_OS_GETACCESSIBILITYTREE = 1957,
|
||||
+ BROWSER_OS_GETINTERACTIVESNAPSHOT = 1958,
|
||||
+ BROWSER_OS_CLICK = 1959,
|
||||
+ BROWSER_OS_INPUTTEXT = 1960,
|
||||
+ BROWSER_OS_CLEAR = 1961,
|
||||
+ BROWSER_OS_GETPAGELOADSTATUS = 1962,
|
||||
+ BROWSER_OS_SCROLLUP = 1963,
|
||||
+ BROWSER_OS_SCROLLDOWN = 1964,
|
||||
+ BROWSER_OS_SCROLLTONODE = 1965,
|
||||
+ BROWSER_OS_SENDKEYS = 1966,
|
||||
+ BROWSER_OS_GETPAGESTRUCTURE = 1967,
|
||||
+ BROWSER_OS_CAPTURESCREENSHOT = 1968,
|
||||
+ BROWSER_OS_GETSNAPSHOT = 1969,
|
||||
+ BROWSER_OS_GETPREF = 1970,
|
||||
+ BROWSER_OS_SETPREF = 1971,
|
||||
+ BROWSER_OS_GETALLPREFS = 1972,
|
||||
+ BROWSER_OS_LOGMETRIC = 1973,
|
||||
+ BROWSER_OS_GETVERSIONNUMBER = 1974,
|
||||
+ BROWSER_OS_EXECUTEJAVASCRIPT = 1975,
|
||||
+ BROWSER_OS_CLICKCOORDINATES = 1976,
|
||||
+ BROWSER_OS_TYPEATCOORDINATES = 1977,
|
||||
+ SIDEPANEL_BROWSEROSTOGGLE = 1978,
|
||||
+ SIDEPANEL_BROWSEROSISOPEN = 1979,
|
||||
+ BROWSER_OS_GETBROWSEROSVERSIONNUMBER = 1980,
|
||||
+ BROWSER_OS_CHOOSEPATH = 1981,
|
||||
+ BROWSER_OS_GETACCESSIBILITYTREE = 1961,
|
||||
+ BROWSER_OS_GETINTERACTIVESNAPSHOT = 1962,
|
||||
+ BROWSER_OS_CLICK = 1963,
|
||||
+ BROWSER_OS_INPUTTEXT = 1964,
|
||||
+ BROWSER_OS_CLEAR = 1965,
|
||||
+ BROWSER_OS_GETPAGELOADSTATUS = 1966,
|
||||
+ BROWSER_OS_SCROLLUP = 1967,
|
||||
+ BROWSER_OS_SCROLLDOWN = 1968,
|
||||
+ BROWSER_OS_SCROLLTONODE = 1969,
|
||||
+ BROWSER_OS_SENDKEYS = 1970,
|
||||
+ BROWSER_OS_GETPAGESTRUCTURE = 1971,
|
||||
+ BROWSER_OS_CAPTURESCREENSHOT = 1972,
|
||||
+ BROWSER_OS_GETSNAPSHOT = 1973,
|
||||
+ BROWSER_OS_GETPREF = 1974,
|
||||
+ BROWSER_OS_SETPREF = 1975,
|
||||
+ BROWSER_OS_GETALLPREFS = 1976,
|
||||
+ BROWSER_OS_LOGMETRIC = 1977,
|
||||
+ BROWSER_OS_GETVERSIONNUMBER = 1978,
|
||||
+ BROWSER_OS_EXECUTEJAVASCRIPT = 1979,
|
||||
+ BROWSER_OS_CLICKCOORDINATES = 1980,
|
||||
+ BROWSER_OS_TYPEATCOORDINATES = 1981,
|
||||
+ SIDEPANEL_BROWSEROSTOGGLE = 1982,
|
||||
+ SIDEPANEL_BROWSEROSISOPEN = 1983,
|
||||
+ BROWSER_OS_GETBROWSEROSVERSIONNUMBER = 1984,
|
||||
+ BROWSER_OS_CHOOSEPATH = 1985,
|
||||
// Last entry: Add new entries above, then run:
|
||||
// tools/metrics/histograms/update_extension_histograms.py
|
||||
ENUM_BOUNDARY
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
diff --git a/extensions/common/mojom/api_permission_id.mojom b/extensions/common/mojom/api_permission_id.mojom
|
||||
index e19de6942981b..cb68d51fd4277 100644
|
||||
index 7f69d0c4c8412..8920912761522 100644
|
||||
--- a/extensions/common/mojom/api_permission_id.mojom
|
||||
+++ b/extensions/common/mojom/api_permission_id.mojom
|
||||
@@ -288,6 +288,7 @@ enum APIPermissionID {
|
||||
kOmniboxDirectInput = 261,
|
||||
@@ -289,6 +289,7 @@ enum APIPermissionID {
|
||||
kExperimentalActor = 262,
|
||||
kEnterpriseLogin = 263,
|
||||
+ kBrowserOS = 264,
|
||||
kProxyOverrideRulesPrivate = 264,
|
||||
+ kBrowserOS = 265,
|
||||
|
||||
// Add new entries at the end of the enum and be sure to update the
|
||||
// "ExtensionPermission3" enum in
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
diff --git a/tools/metrics/histograms/metadata/browser/enums.xml b/tools/metrics/histograms/metadata/browser/enums.xml
|
||||
index 007aa3eb6038e..789d47a8811e5 100644
|
||||
index 3084d75e4dd4a..c73bd4123c016 100644
|
||||
--- a/tools/metrics/histograms/metadata/browser/enums.xml
|
||||
+++ b/tools/metrics/histograms/metadata/browser/enums.xml
|
||||
@@ -363,6 +363,7 @@ chromium-metrics-reviews@google.com.
|
||||
<int value="128" label="SESSION_RESTORE_INFOBAR_DELEGATE"/>
|
||||
@@ -364,6 +364,7 @@ chromium-metrics-reviews@google.com.
|
||||
<int value="129" label="ROLL_BACK_MODE_B_INFOBAR_DELEGATE"/>
|
||||
<int value="130" label="DEV_TOOLS_REMOTE_DEBUGGING_INFOBAR_DELEGATE"/>
|
||||
+ <int value="131" label="BROWSEROS_AGENT_INSTALLING_INFOBAR_DELEGATE"/>
|
||||
<int value="131" label="STARTUP_LAUNCH_INFOBAR_DELEGATE"/>
|
||||
+ <int value="132" label="BROWSEROS_AGENT_INSTALLING_INFOBAR_DELEGATE"/>
|
||||
</enum>
|
||||
|
||||
<!-- LINT.ThenChange(//components/infobars/core/infobar_delegate.h:InfoBarIdentifier) -->
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
diff --git a/tools/metrics/histograms/metadata/extensions/enums.xml b/tools/metrics/histograms/metadata/extensions/enums.xml
|
||||
index 6a374906f9f2e..4defc26e74df9 100644
|
||||
index aa7937ea189d3..341f957a8b134 100644
|
||||
--- a/tools/metrics/histograms/metadata/extensions/enums.xml
|
||||
+++ b/tools/metrics/histograms/metadata/extensions/enums.xml
|
||||
@@ -2871,6 +2871,31 @@ Called by update_extension_histograms.py.-->
|
||||
label="WEBSTOREPRIVATE_SHOULDSHOWENTERPRISEPROMOTIONBANNER"/>
|
||||
<int value="1955" label="WEBSTOREPRIVATE_LOGENTERPRISEPROMOSHOWN"/>
|
||||
<int value="1956" label="WEBSTOREPRIVATE_ONENTERPRISEPROMOCLICK"/>
|
||||
+ <int value="1957" label="BROWSER_OS_GETACCESSIBILITYTREE"/>
|
||||
+ <int value="1958" label="BROWSER_OS_GETINTERACTIVESNAPSHOT"/>
|
||||
+ <int value="1959" label="BROWSER_OS_CLICK"/>
|
||||
+ <int value="1960" label="BROWSER_OS_INPUTTEXT"/>
|
||||
+ <int value="1961" label="BROWSER_OS_CLEAR"/>
|
||||
+ <int value="1962" label="BROWSER_OS_GETPAGELOADSTATUS"/>
|
||||
+ <int value="1963" label="BROWSER_OS_SCROLLUP"/>
|
||||
+ <int value="1964" label="BROWSER_OS_SCROLLDOWN"/>
|
||||
+ <int value="1965" label="BROWSER_OS_SCROLLTONODE"/>
|
||||
+ <int value="1966" label="BROWSER_OS_SENDKEYS"/>
|
||||
+ <int value="1967" label="BROWSER_OS_GETPAGESTRUCTURE"/>
|
||||
+ <int value="1968" label="BROWSER_OS_CAPTURESCREENSHOT"/>
|
||||
+ <int value="1969" label="BROWSER_OS_GETSNAPSHOT"/>
|
||||
+ <int value="1970" label="BROWSER_OS_GETPREF"/>
|
||||
+ <int value="1971" label="BROWSER_OS_SETPREF"/>
|
||||
+ <int value="1972" label="BROWSER_OS_GETALLPREFS"/>
|
||||
+ <int value="1973" label="BROWSER_OS_LOGMETRIC"/>
|
||||
+ <int value="1974" label="BROWSER_OS_GETVERSIONNUMBER"/>
|
||||
+ <int value="1975" label="BROWSER_OS_EXECUTEJAVASCRIPT"/>
|
||||
+ <int value="1976" label="BROWSER_OS_CLICKCOORDINATES"/>
|
||||
+ <int value="1977" label="BROWSER_OS_TYPEATCOORDINATES"/>
|
||||
+ <int value="1978" label="SIDEPANEL_BROWSEROSTOGGLE"/>
|
||||
+ <int value="1979" label="SIDEPANEL_BROWSEROSISOPEN"/>
|
||||
+ <int value="1980" label="BROWSER_OS_GETBROWSEROSVERSIONNUMBER"/>
|
||||
+ <int value="1981" label="BROWSER_OS_CHOOSEPATH"/>
|
||||
@@ -2877,6 +2877,31 @@ Called by update_extension_histograms.py.-->
|
||||
<int value="1959"
|
||||
label="AUTOFILLPRIVATE_GETREQUIREDATTRIBUTETYPESFORENTITYTYPENAME"/>
|
||||
<int value="1960" label="PDFVIEWERPRIVATE_GLICSUMMARIZE"/>
|
||||
+ <int value="1961" label="BROWSER_OS_GETACCESSIBILITYTREE"/>
|
||||
+ <int value="1962" label="BROWSER_OS_GETINTERACTIVESNAPSHOT"/>
|
||||
+ <int value="1963" label="BROWSER_OS_CLICK"/>
|
||||
+ <int value="1964" label="BROWSER_OS_INPUTTEXT"/>
|
||||
+ <int value="1965" label="BROWSER_OS_CLEAR"/>
|
||||
+ <int value="1966" label="BROWSER_OS_GETPAGELOADSTATUS"/>
|
||||
+ <int value="1967" label="BROWSER_OS_SCROLLUP"/>
|
||||
+ <int value="1968" label="BROWSER_OS_SCROLLDOWN"/>
|
||||
+ <int value="1969" label="BROWSER_OS_SCROLLTONODE"/>
|
||||
+ <int value="1970" label="BROWSER_OS_SENDKEYS"/>
|
||||
+ <int value="1971" label="BROWSER_OS_GETPAGESTRUCTURE"/>
|
||||
+ <int value="1972" label="BROWSER_OS_CAPTURESCREENSHOT"/>
|
||||
+ <int value="1973" label="BROWSER_OS_GETSNAPSHOT"/>
|
||||
+ <int value="1974" label="BROWSER_OS_GETPREF"/>
|
||||
+ <int value="1975" label="BROWSER_OS_SETPREF"/>
|
||||
+ <int value="1976" label="BROWSER_OS_GETALLPREFS"/>
|
||||
+ <int value="1977" label="BROWSER_OS_LOGMETRIC"/>
|
||||
+ <int value="1978" label="BROWSER_OS_GETVERSIONNUMBER"/>
|
||||
+ <int value="1979" label="BROWSER_OS_EXECUTEJAVASCRIPT"/>
|
||||
+ <int value="1980" label="BROWSER_OS_CLICKCOORDINATES"/>
|
||||
+ <int value="1981" label="BROWSER_OS_TYPEATCOORDINATES"/>
|
||||
+ <int value="1982" label="SIDEPANEL_BROWSEROSTOGGLE"/>
|
||||
+ <int value="1983" label="SIDEPANEL_BROWSEROSISOPEN"/>
|
||||
+ <int value="1984" label="BROWSER_OS_GETBROWSEROSVERSIONNUMBER"/>
|
||||
+ <int value="1985" label="BROWSER_OS_CHOOSEPATH"/>
|
||||
</enum>
|
||||
|
||||
<!-- LINT.ThenChange(//extensions/browser/extension_function_histogram_value.h:HistogramValue) -->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
BROWSEROS_MAJOR=0
|
||||
BROWSEROS_MINOR=41
|
||||
BROWSEROS_BUILD=0
|
||||
BROWSEROS_PATCH=1
|
||||
BROWSEROS_BUILD=1
|
||||
BROWSEROS_PATCH=0
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
diff --git a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
||||
index e29ca8a104ad7..e7eb51b264428 100644
|
||||
--- a/chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
||||
+++ b/chrome/browser/extensions/api/developer_private/extension_info_generator.cc
|
||||
@@ -878,19 +878,6 @@ void ExtensionInfoGenerator::FillExtensi
|
||||
@@ -860,20 +860,6 @@ void ExtensionInfoGenerator::FillExtensionInfo(const Extension& extension,
|
||||
toolbar_actions_model->IsActionPinned(extension.id());
|
||||
}
|
||||
|
||||
@@ -17,12 +19,15 @@
|
||||
- extension_urls::GetNewWebstoreItemRecommendationsUrl(extension.id())
|
||||
- .spec();
|
||||
- }
|
||||
|
||||
-
|
||||
// Whether the extension can be uploaded as an account extension.
|
||||
// `CanUploadAsAccountExtension` should already check for the feature flag
|
||||
// somewhere but add another guard for it here just in case.
|
||||
diff --git a/chrome/browser/extensions/extension_management.cc b/chrome/browser/extensions/extension_management.cc
|
||||
index bb0e7b5cba7e0..8349aa335b1fd 100644
|
||||
--- a/chrome/browser/extensions/extension_management.cc
|
||||
+++ b/chrome/browser/extensions/extension_management.cc
|
||||
@@ -371,31 +371,7 @@ bool ExtensionManagement::IsAllowedManif
|
||||
@@ -372,31 +372,7 @@ bool ExtensionManagement::IsAllowedManifestVersion(
|
||||
int manifest_version,
|
||||
const std::string& extension_id,
|
||||
Manifest::Type manifest_type) {
|
||||
@@ -54,7 +59,7 @@
|
||||
}
|
||||
|
||||
bool ExtensionManagement::IsAllowedManifestVersion(const Extension* extension) {
|
||||
@@ -416,26 +392,8 @@ bool ExtensionManagement::IsExemptFromMV
|
||||
@@ -417,26 +393,8 @@ bool ExtensionManagement::IsExemptFromMV2DeprecationByPolicy(
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -81,9 +86,11 @@
|
||||
}
|
||||
|
||||
bool ExtensionManagement::IsAllowedByUnpublishedAvailabilityPolicy(
|
||||
diff --git a/chrome/browser/extensions/manifest_v2_experiment_manager.cc b/chrome/browser/extensions/manifest_v2_experiment_manager.cc
|
||||
index 571213419eafa..73ffd08599ead 100644
|
||||
--- a/chrome/browser/extensions/manifest_v2_experiment_manager.cc
|
||||
+++ b/chrome/browser/extensions/manifest_v2_experiment_manager.cc
|
||||
@@ -147,17 +147,6 @@ bool ManifestV2ExperimentManagerFactory:
|
||||
@@ -147,17 +147,6 @@ bool ManifestV2ExperimentManagerFactory::ServiceIsCreatedWithBrowserContext()
|
||||
|
||||
// Determines the current stage of the MV2 deprecation experiments.
|
||||
MV2ExperimentStage CalculateCurrentExperimentStage() {
|
||||
@@ -101,7 +108,7 @@
|
||||
return MV2ExperimentStage::kWarning;
|
||||
}
|
||||
|
||||
@@ -191,18 +180,7 @@ PrefMap GetGlobalNoticeAcknowledgedPrefF
|
||||
@@ -191,18 +180,7 @@ PrefMap GetGlobalNoticeAcknowledgedPrefFor(
|
||||
// Returns true if legacy extensions should be disabled, looking at both
|
||||
// experiment stage and global state.
|
||||
bool ShouldDisableLegacyExtensions(MV2ExperimentStage stage) {
|
||||
@@ -120,20 +127,24 @@
|
||||
}
|
||||
|
||||
// Returns true if the given `stage` is one in which extension enablement should
|
||||
diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc
|
||||
index f482bb58c258f..3a1b2396659d3 100644
|
||||
--- a/chrome/browser/ui/webui/extensions/extensions_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc
|
||||
@@ -484,7 +484,7 @@ content::WebUIDataSource* CreateAndAddEx
|
||||
@@ -488,7 +488,7 @@ content::WebUIDataSource* CreateAndAddExtensionsSource(Profile* profile,
|
||||
extensions_features::kExtensionsMenuAccessControlWithPermittedSites));
|
||||
source->AddBoolean(
|
||||
"safetyHubThreeDotDetails",
|
||||
- base::FeatureList::IsEnabled(features::kSafetyHubThreeDotDetails));
|
||||
+ false);
|
||||
source->AddBoolean("enableGlobalScopedShortcuts", IsGlobalShortcutEnabled());
|
||||
|
||||
// MV2 deprecation.
|
||||
auto* mv2_experiment_manager = ManifestV2ExperimentManager::Get(profile);
|
||||
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
|
||||
index 25f6860b1db1f..5cad187cb73cd 100644
|
||||
--- a/extensions/common/extension.cc
|
||||
+++ b/extensions/common/extension.cc
|
||||
@@ -97,13 +97,6 @@ bool IsManifestSupported(int manifest_ve
|
||||
@@ -97,13 +97,6 @@ bool IsManifestSupported(int manifest_version,
|
||||
// Supported versions are always safe.
|
||||
if (manifest_version >= kMinimumSupportedManifestVersion &&
|
||||
manifest_version <= kMaximumSupportedManifestVersion) {
|
||||
|
||||
Reference in New Issue
Block a user