Build fixes
This commit is contained in:
parent
1221764d3f
commit
79db2a27e7
8 changed files with 186 additions and 103 deletions
|
@ -181,3 +181,4 @@ Make-HTTPS-only-mode-the-default.patch
|
|||
disable-mobile-identity-consistency-by-default.patch
|
||||
Disable-idle-detection.patch
|
||||
Automated-domain-substitution.patch
|
||||
Allow-building-without-supervised-users.patch
|
||||
|
|
|
@ -23,8 +23,8 @@ for SimpleURLLoaders as well.
|
|||
chrome/browser/resources/proxy_config.js | 266 +++++++++++
|
||||
chrome/browser/ui/BUILD.gn | 2 +
|
||||
.../webui/chrome_web_ui_controller_factory.cc | 3 +
|
||||
chrome/browser/ui/webui/proxy_config_ui.cc | 419 ++++++++++++++++++
|
||||
chrome/browser/ui/webui/proxy_config_ui.h | 33 ++
|
||||
chrome/browser/ui/webui/proxy_config_ui.cc | 418 ++++++++++++++++++
|
||||
chrome/browser/ui/webui/proxy_config_ui.h | 31 ++
|
||||
chrome/common/webui_url_constants.cc | 4 +
|
||||
chrome/common/webui_url_constants.h | 2 +
|
||||
.../pref_proxy_config_tracker_impl.cc | 1 +
|
||||
|
@ -33,7 +33,7 @@ for SimpleURLLoaders as well.
|
|||
.../proxy_config/proxy_policy_handler.cc | 2 +-
|
||||
net/proxy_resolution/proxy_config.cc | 52 ++-
|
||||
net/proxy_resolution/proxy_config.h | 3 +
|
||||
24 files changed, 998 insertions(+), 14 deletions(-)
|
||||
24 files changed, 995 insertions(+), 14 deletions(-)
|
||||
create mode 100644 chrome/browser/resources/proxy_config.css
|
||||
create mode 100644 chrome/browser/resources/proxy_config.html
|
||||
create mode 100644 chrome/browser/resources/proxy_config.js
|
||||
|
@ -660,7 +660,7 @@ diff --git a/chrome/browser/ui/webui/proxy_config_ui.cc b/chrome/browser/ui/webu
|
|||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/ui/webui/proxy_config_ui.cc
|
||||
@@ -0,0 +1,419 @@
|
||||
@@ -0,0 +1,418 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
|
@ -689,7 +689,6 @@ new file mode 100644
|
|||
+#include "base/bind.h"
|
||||
+#include "base/command_line.h"
|
||||
+#include "base/lazy_instance.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "base/memory/ref_counted.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "base/strings/utf_string_conversions.h"
|
||||
|
@ -737,6 +736,8 @@ new file mode 100644
|
|||
+ public base::SupportsWeakPtr<ProxyConfigMessageHandler>,
|
||||
+ public net::ProxyConfigService::Observer {
|
||||
+ public:
|
||||
+ ProxyConfigMessageHandler(const ProxyConfigMessageHandler&) = delete;
|
||||
+ ProxyConfigMessageHandler& operator=(const ProxyConfigMessageHandler&) = delete;
|
||||
+ // Creates a ProxyConfigMessageHandler that handles message exchanges with the Javascript
|
||||
+ // side of the UI and gets proxy settings from the Web UI associated profile to watch for changes.
|
||||
+ // The created ProxyConfigMessageHandler must be destroyed before |profile|.
|
||||
|
@ -771,8 +772,6 @@ new file mode 100644
|
|||
+ void apply(const net::ProxyConfig& config);
|
||||
+
|
||||
+ base::WeakPtrFactory<ProxyConfigMessageHandler> weak_ptr_factory_;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(ProxyConfigMessageHandler);
|
||||
+};
|
||||
+
|
||||
+ProxyConfigMessageHandler::ProxyConfigMessageHandler(Profile *profile)
|
||||
|
@ -1084,7 +1083,7 @@ diff --git a/chrome/browser/ui/webui/proxy_config_ui.h b/chrome/browser/ui/webui
|
|||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/ui/webui/proxy_config_ui.h
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -0,0 +1,31 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
|
@ -1105,16 +1104,14 @@ new file mode 100644
|
|||
+#ifndef CHROME_BROWSER_UI_WEBUI_PROXY_CONFIG_UI_H_
|
||||
+#define CHROME_BROWSER_UI_WEBUI_PROXY_CONFIG_UI_H_
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "content/public/browser/web_ui_controller.h"
|
||||
+
|
||||
+// The WebUI for chrome://proxy/.
|
||||
+class ProxyConfigUI : public content::WebUIController {
|
||||
+ public:
|
||||
+ ProxyConfigUI(const ProxyConfigUI&) = delete;
|
||||
+ ProxyConfigUI& operator=(const ProxyConfigUI&) = delete;
|
||||
+ explicit ProxyConfigUI(content::WebUI* web_ui);
|
||||
+
|
||||
+ private:
|
||||
+ DISALLOW_COPY_AND_ASSIGN(ProxyConfigUI);
|
||||
+};
|
||||
+
|
||||
+#endif // CHROME_BROWSER_UI_WEBUI_PROXY_CONFIG_UI_H_
|
||||
|
|
74
build/patches/Allow-building-without-supervised-users.patch
Normal file
74
build/patches/Allow-building-without-supervised-users.patch
Normal file
|
@ -0,0 +1,74 @@
|
|||
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
||||
Date: Mon, 21 Feb 2022 01:24:11 +0100
|
||||
Subject: Allow building without supervised users
|
||||
|
||||
---
|
||||
.../browser/childaccounts/ChildAccountService.java | 11 -----------
|
||||
chrome/browser/startup_data.cc | 4 +---
|
||||
.../child_accounts/child_account_service_android.cc | 9 ---------
|
||||
3 files changed, 1 insertion(+), 23 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java
|
||||
@@ -31,21 +31,10 @@ public class ChildAccountService {
|
||||
ThreadUtils.assertOnUiThread();
|
||||
final Activity activity = windowAndroid.getActivity().get();
|
||||
if (activity == null) {
|
||||
- PostTask.postTask(UiThreadTaskTraits.DEFAULT, () -> {
|
||||
- ChildAccountServiceJni.get().onReauthenticationFailed(nativeOnFailureCallback);
|
||||
- });
|
||||
return;
|
||||
}
|
||||
Account account = AccountUtils.createAccountFromName(accountName);
|
||||
AccountManagerFacadeProvider.getInstance().updateCredentials(account, activity, success -> {
|
||||
- if (!success) {
|
||||
- ChildAccountServiceJni.get().onReauthenticationFailed(nativeOnFailureCallback);
|
||||
- }
|
||||
});
|
||||
}
|
||||
-
|
||||
- @NativeMethods
|
||||
- interface Natives {
|
||||
- void onReauthenticationFailed(long onFailureCallbackPtr);
|
||||
- }
|
||||
}
|
||||
diff --git a/chrome/browser/startup_data.cc b/chrome/browser/startup_data.cc
|
||||
--- a/chrome/browser/startup_data.cc
|
||||
+++ b/chrome/browser/startup_data.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/task/thread_pool.h"
|
||||
+#include "build/build_config.h"
|
||||
#include "chrome/browser/metrics/chrome_feature_list_creator.h"
|
||||
#include "chrome/browser/prefs/profile_pref_store_manager.h"
|
||||
#include "chrome/common/channel_info.h"
|
||||
@@ -33,9 +34,6 @@
|
||||
#include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h"
|
||||
#include "chrome/browser/profiles/pref_service_builder_utils.h"
|
||||
#include "chrome/browser/profiles/profile_key.h"
|
||||
-#include "chrome/browser/supervised_user/supervised_user_pref_store.h"
|
||||
-#include "chrome/browser/supervised_user/supervised_user_settings_service.h"
|
||||
-#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
|
||||
#include "chrome/common/chrome_constants.h"
|
||||
#include "chrome/common/chrome_paths.h"
|
||||
#include "components/keyed_service/content/browser_context_dependency_manager.h"
|
||||
diff --git a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
|
||||
--- a/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
|
||||
+++ b/chrome/browser/supervised_user/child_accounts/child_account_service_android.cc
|
||||
@@ -39,12 +39,3 @@ void ReauthenticateChildAccount(
|
||||
env, window_android->GetJavaObject(), ConvertUTF8ToJavaString(env, email),
|
||||
reinterpret_cast<jlong>(callback_copy.release()));
|
||||
}
|
||||
-
|
||||
-void JNI_ChildAccountService_OnReauthenticationFailed(JNIEnv* env,
|
||||
- jlong jcallbackPtr) {
|
||||
- // Cast the pointer value back to a Callback and take ownership of it.
|
||||
- std::unique_ptr<base::RepeatingCallback<void()>> callback(
|
||||
- reinterpret_cast<base::RepeatingCallback<void()>*>(jcallbackPtr));
|
||||
-
|
||||
- callback->Run();
|
||||
-}
|
||||
--
|
||||
2.25.1
|
|
@ -542,15 +542,15 @@ diff --git a/chrome/browser/browser_process_impl.h b/chrome/browser/browser_proc
|
|||
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
||||
--- a/chrome/browser/chrome_browser_main.cc
|
||||
+++ b/chrome/browser/chrome_browser_main.cc
|
||||
@@ -1655,6 +1655,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
user_data_dir_,
|
||||
/*send_sets=*/
|
||||
base::BindOnce(
|
||||
@@ -1714,6 +1714,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
browser_process_->StartAutoupdateTimer();
|
||||
#endif // defined(OS_WIN) || (defined(OS_LINUX) ||
|
||||
// BUILDFLAG(IS_CHROMEOS_LACROS))
|
||||
+ // force AdBlock updater initialisation
|
||||
+ g_browser_process->adblock_updater();
|
||||
[](base::OnceCallback<void(const std::string&)> callback,
|
||||
const std::string& sets) {
|
||||
content::GetNetworkService()
|
||||
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
diff --git a/chrome/browser/flags/android/cached_feature_flags.cc b/chrome/browser/flags/android/cached_feature_flags.cc
|
||||
--- a/chrome/browser/flags/android/cached_feature_flags.cc
|
||||
+++ b/chrome/browser/flags/android/cached_feature_flags.cc
|
||||
|
|
|
@ -3,9 +3,10 @@ Date: Wed, 20 Feb 2019 21:41:26 +0100
|
|||
Subject: Disable metrics collection for NTP tiles
|
||||
|
||||
---
|
||||
.../browser/android/ntp/most_visited_sites_bridge.cc | 10 ++--------
|
||||
components/ntp_tiles/BUILD.gn | 3 ---
|
||||
2 files changed, 2 insertions(+), 11 deletions(-)
|
||||
.../android/ntp/most_visited_sites_bridge.cc | 17 -----------------
|
||||
components/ntp_tiles/BUILD.gn | 3 ---
|
||||
components/ntp_tiles/most_visited_sites.cc | 2 --
|
||||
3 files changed, 22 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
|
||||
|
@ -34,23 +35,23 @@ diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/br
|
|||
}
|
||||
|
||||
void MostVisitedSitesBridge::RecordTileImpression(
|
||||
@@ -245,6 +242,7 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
@@ -245,15 +242,6 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
jint jtitle_source,
|
||||
jint jsource,
|
||||
const JavaParamRef<jobject>& jurl) {
|
||||
+#if 0
|
||||
std::unique_ptr<GURL> url = url::GURLAndroid::ToNativeGURL(env, jurl);
|
||||
TileTitleSource title_source = static_cast<TileTitleSource>(jtitle_source);
|
||||
TileSource source = static_cast<TileSource>(jsource);
|
||||
@@ -254,6 +252,7 @@ void MostVisitedSitesBridge::RecordTileImpression(
|
||||
|
||||
ntp_tiles::metrics::RecordTileImpression(ntp_tiles::NTPTileImpression(
|
||||
jindex, source, title_source, visual_type, icon_type, *url));
|
||||
+#endif
|
||||
- std::unique_ptr<GURL> url = url::GURLAndroid::ToNativeGURL(env, jurl);
|
||||
- TileTitleSource title_source = static_cast<TileTitleSource>(jtitle_source);
|
||||
- TileSource source = static_cast<TileSource>(jsource);
|
||||
- TileVisualType visual_type = static_cast<TileVisualType>(jvisual_type);
|
||||
- favicon_base::IconType icon_type =
|
||||
- static_cast<favicon_base::IconType>(jicon_type);
|
||||
-
|
||||
- ntp_tiles::metrics::RecordTileImpression(ntp_tiles::NTPTileImpression(
|
||||
- jindex, source, title_source, visual_type, icon_type, *url));
|
||||
}
|
||||
|
||||
void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
@@ -263,11 +262,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
@@ -263,11 +251,6 @@ void MostVisitedSitesBridge::RecordOpenedMostVisitedItem(
|
||||
jint tile_type,
|
||||
jint title_source,
|
||||
jint source) {
|
||||
|
@ -82,5 +83,17 @@ diff --git a/components/ntp_tiles/BUILD.gn b/components/ntp_tiles/BUILD.gn
|
|||
"most_visited_sites_unittest.cc",
|
||||
"popular_sites_impl_unittest.cc",
|
||||
]
|
||||
diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/most_visited_sites.cc
|
||||
--- a/components/ntp_tiles/most_visited_sites.cc
|
||||
+++ b/components/ntp_tiles/most_visited_sites.cc
|
||||
@@ -724,8 +724,6 @@ void MostVisitedSites::SaveTilesAndNotify(
|
||||
: new_tiles;
|
||||
|
||||
if (fixed_tiles.size() != new_tiles.size()) {
|
||||
- metrics::RecordsMigratedDefaultAppDeleted(
|
||||
- DeletedTileType::kMostVisitedSite);
|
||||
}
|
||||
if (!current_tiles_.has_value() || (*current_tiles_ != fixed_tiles)) {
|
||||
current_tiles_.emplace(std::move(fixed_tiles));
|
||||
--
|
||||
2.25.1
|
||||
|
|
|
@ -51,7 +51,7 @@ Disable CrowdDeny feature
|
|||
.../permissions/chrome_permissions_client.cc | 14 ----
|
||||
.../permissions/chrome_permissions_client.h | 3 -
|
||||
...quiet_notification_permission_ui_config.cc | 4 +-
|
||||
...hrome_browser_main_extra_parts_profiles.cc | 3 +-
|
||||
...hrome_browser_main_extra_parts_profiles.cc | 4 +-
|
||||
chrome/browser/profiles/profile_impl.cc | 4 +-
|
||||
chrome/browser/safe_browsing/BUILD.gn | 4 +-
|
||||
chrome/browser/safe_browsing/android/BUILD.gn | 4 -
|
||||
|
@ -88,7 +88,7 @@ Disable CrowdDeny feature
|
|||
.../file_system_access_permission_context.h | 6 --
|
||||
weblayer/BUILD.gn | 1 -
|
||||
weblayer/test/BUILD.gn | 1 -
|
||||
82 files changed, 187 insertions(+), 674 deletions(-)
|
||||
82 files changed, 187 insertions(+), 675 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/google_services_preferences.xml b/chrome/android/java/res/xml/google_services_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/google_services_preferences.xml
|
||||
|
@ -1919,17 +1919,15 @@ diff --git a/chrome/browser/permissions/quiet_notification_permission_ui_config.
|
|||
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
@@ -75,7 +75,9 @@
|
||||
@@ -75,7 +75,6 @@
|
||||
#include "chrome/browser/privacy/privacy_metrics_service_factory.h"
|
||||
#include "chrome/browser/privacy_sandbox/privacy_sandbox_settings_factory.h"
|
||||
#include "chrome/browser/profiles/renderer_updater_factory.h"
|
||||
+#if BUILDFLAG(FULL_SAFE_BROWSING)
|
||||
#include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h"
|
||||
+#endif
|
||||
-#include "chrome/browser/safe_browsing/certificate_reporting_service_factory.h"
|
||||
#include "chrome/browser/safe_browsing/tailored_security/tailored_security_service_factory.h"
|
||||
#include "chrome/browser/search_engines/template_url_fetcher_factory.h"
|
||||
#include "chrome/browser/search_engines/template_url_service_factory.h"
|
||||
@@ -307,7 +309,6 @@ void ChromeBrowserMainExtraPartsProfiles::
|
||||
@@ -307,7 +306,6 @@ void ChromeBrowserMainExtraPartsProfiles::
|
||||
#if BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
CertDbInitializerFactory::GetInstance();
|
||||
#endif
|
||||
|
@ -1937,6 +1935,16 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
|||
#if !defined(OS_ANDROID)
|
||||
ChromeBrowsingDataLifetimeManagerFactory::GetInstance();
|
||||
#endif
|
||||
@@ -507,7 +505,9 @@ void ChromeBrowserMainExtraPartsProfiles::
|
||||
SystemExtensionsProviderFactory::GetInstance();
|
||||
#endif
|
||||
TabRestoreServiceFactory::GetInstance();
|
||||
+#if BUILDFLAG(FULL_SAFE_BROWSING)
|
||||
safe_browsing::TailoredSecurityServiceFactory::GetInstance();
|
||||
+#endif
|
||||
TemplateURLFetcherFactory::GetInstance();
|
||||
TemplateURLServiceFactory::GetInstance();
|
||||
#if !defined(OS_ANDROID)
|
||||
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
||||
--- a/chrome/browser/profiles/profile_impl.cc
|
||||
+++ b/chrome/browser/profiles/profile_impl.cc
|
||||
|
|
|
@ -70,10 +70,10 @@ See also: components/user_scripts/README.md
|
|||
.../browser/resources/user-script-ui/BUILD.gn | 12 +
|
||||
.../user-script-ui/user-scripts-ui.html | 14 +
|
||||
.../user-script-ui/user-scripts-ui.js | 9 +
|
||||
.../browser/ui/user_scripts_ui.cc | 148 ++++
|
||||
.../user_scripts/browser/ui/user_scripts_ui.h | 39 +
|
||||
.../browser/ui/user_scripts_ui.cc | 147 ++++
|
||||
.../user_scripts/browser/ui/user_scripts_ui.h | 37 +
|
||||
.../browser/user_script_loader.cc | 721 ++++++++++++++++
|
||||
.../user_scripts/browser/user_script_loader.h | 170 ++++
|
||||
.../user_scripts/browser/user_script_loader.h | 169 ++++
|
||||
.../browser/user_script_pref_info.cc | 34 +
|
||||
.../browser/user_script_pref_info.h | 72 ++
|
||||
.../user_scripts/browser/user_script_prefs.cc | 276 ++++++
|
||||
|
@ -115,25 +115,25 @@ See also: components/user_scripts/README.md
|
|||
.../renderer/script_injection_callback.cc | 25 +
|
||||
.../renderer/script_injection_callback.h | 38 +
|
||||
.../renderer/script_injection_manager.cc | 417 +++++++++
|
||||
.../renderer/script_injection_manager.h | 102 +++
|
||||
.../renderer/script_injection_manager.h | 101 +++
|
||||
.../user_scripts/renderer/script_injector.h | 96 +++
|
||||
.../user_scripts/renderer/scripts_run_info.cc | 31 +
|
||||
.../user_scripts/renderer/scripts_run_info.h | 70 ++
|
||||
.../user_scripts/renderer/scripts_run_info.h | 69 ++
|
||||
.../renderer/user_script_injector.cc | 228 +++++
|
||||
.../renderer/user_script_injector.h | 87 ++
|
||||
.../renderer/user_script_injector.h | 86 ++
|
||||
.../user_scripts/renderer/user_script_set.cc | 259 ++++++
|
||||
.../user_scripts/renderer/user_script_set.h | 102 +++
|
||||
.../user_scripts/renderer/user_script_set.h | 101 +++
|
||||
.../renderer/user_script_set_manager.cc | 77 ++
|
||||
.../renderer/user_script_set_manager.h | 61 ++
|
||||
.../renderer/user_scripts_dispatcher.cc | 36 +
|
||||
.../renderer/user_scripts_dispatcher.h | 48 ++
|
||||
.../renderer/user_scripts_dispatcher.h | 49 ++
|
||||
.../renderer/user_scripts_renderer_client.cc | 105 +++
|
||||
.../renderer/user_scripts_renderer_client.h | 36 +
|
||||
.../renderer/user_scripts_renderer_client.h | 37 +
|
||||
.../renderer/web_ui_injection_host.cc | 40 +
|
||||
.../renderer/web_ui_injection_host.h | 28 +
|
||||
.../renderer/web_ui_injection_host.h | 27 +
|
||||
.../strings/userscripts_strings.grdp | 55 ++
|
||||
tools/gritsettings/resource_ids.spec | 6 +
|
||||
111 files changed, 9572 insertions(+), 2 deletions(-)
|
||||
111 files changed, 9565 insertions(+), 2 deletions(-)
|
||||
create mode 100644 components/user_scripts/README.md
|
||||
create mode 100755 components/user_scripts/android/BUILD.gn
|
||||
create mode 100644 components/user_scripts/android/java/res/layout/accept_script_item.xml
|
||||
|
@ -430,7 +430,7 @@ diff --git a/chrome/browser/profiles/BUILD.gn b/chrome/browser/profiles/BUILD.gn
|
|||
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
@@ -228,6 +228,8 @@
|
||||
@@ -225,6 +225,8 @@
|
||||
#include "chrome/browser/ui/cocoa/screentime/screentime_features.h"
|
||||
#endif
|
||||
|
||||
|
@ -439,7 +439,7 @@ diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
|||
namespace chrome {
|
||||
|
||||
void AddProfilesExtraParts(ChromeBrowserMainParts* main_parts) {
|
||||
@@ -537,6 +539,7 @@ void ChromeBrowserMainExtraPartsProfiles::
|
||||
@@ -536,6 +538,7 @@ void ChromeBrowserMainExtraPartsProfiles::
|
||||
#endif
|
||||
WebDataServiceFactory::GetInstance();
|
||||
webrtc_event_logging::WebRtcEventLogManagerKeyedServiceFactory::GetInstance();
|
||||
|
@ -2634,7 +2634,7 @@ diff --git a/components/user_scripts/browser/ui/user_scripts_ui.cc b/components/
|
|||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/browser/ui/user_scripts_ui.cc
|
||||
@@ -0,0 +1,148 @@
|
||||
@@ -0,0 +1,147 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
|
@ -2657,7 +2657,6 @@ new file mode 100644
|
|||
+
|
||||
+#include "base/bind.h"
|
||||
+#include "base/json/json_string_value_serializer.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "base/memory/writable_shared_memory_region.h"
|
||||
+#include "base/strings/string_util.h"
|
||||
+#include "base/values.h"
|
||||
|
@ -2680,6 +2679,8 @@ new file mode 100644
|
|||
+
|
||||
+class UserScriptsUIHandler : public content::WebUIMessageHandler {
|
||||
+ public:
|
||||
+ UserScriptsUIHandler(const UserScriptsUIHandler&) = delete;
|
||||
+ UserScriptsUIHandler& operator=(const UserScriptsUIHandler&) = delete;
|
||||
+ UserScriptsUIHandler();
|
||||
+ ~UserScriptsUIHandler() override;
|
||||
+
|
||||
|
@ -2696,8 +2697,6 @@ new file mode 100644
|
|||
+ std::unique_ptr<user_scripts::UserScriptList> loaded_scripts_;
|
||||
+
|
||||
+ base::WeakPtrFactory<UserScriptsUIHandler> weak_factory_{this};
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(UserScriptsUIHandler);
|
||||
+};
|
||||
+
|
||||
+UserScriptsUIHandler::UserScriptsUIHandler()
|
||||
|
@ -2787,7 +2786,7 @@ diff --git a/components/user_scripts/browser/ui/user_scripts_ui.h b/components/u
|
|||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/browser/ui/user_scripts_ui.h
|
||||
@@ -0,0 +1,39 @@
|
||||
@@ -0,0 +1,37 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
|
@ -2808,7 +2807,6 @@ new file mode 100644
|
|||
+#ifndef USERSCRIPTS_BROWSER_UI_USER_SCRIPTS_UI_H_
|
||||
+#define USERSCRIPTS_BROWSER_UI_USER_SCRIPTS_UI_H_
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "content/public/browser/web_ui_controller.h"
|
||||
+
|
||||
+namespace user_scripts {
|
||||
|
@ -2817,17 +2815,15 @@ new file mode 100644
|
|||
+
|
||||
+class UserScriptsUI : public content::WebUIController {
|
||||
+ public:
|
||||
+ UserScriptsUI(const UserScriptsUI&) = delete;
|
||||
+ UserScriptsUI& operator=(const UserScriptsUI&) = delete;
|
||||
+ explicit UserScriptsUI(content::WebUI* web_ui);
|
||||
+ ~UserScriptsUI() override;
|
||||
+
|
||||
+ private:
|
||||
+ DISALLOW_COPY_AND_ASSIGN(UserScriptsUI);
|
||||
+};
|
||||
+
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/components/user_scripts/browser/user_script_loader.cc b/components/user_scripts/browser/user_script_loader.cc
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
|
@ -3558,7 +3554,7 @@ diff --git a/components/user_scripts/browser/user_script_loader.h b/components/u
|
|||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/browser/user_script_loader.h
|
||||
@@ -0,0 +1,170 @@
|
||||
@@ -0,0 +1,169 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
|
@ -3585,7 +3581,6 @@ new file mode 100755
|
|||
+
|
||||
+#include "base/callback_forward.h"
|
||||
+#include "base/compiler_specific.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "base/memory/read_only_shared_memory_region.h"
|
||||
+#include "base/memory/weak_ptr.h"
|
||||
+#include "base/observer_list.h"
|
||||
|
@ -3616,6 +3611,8 @@ new file mode 100755
|
|||
+class UserScriptLoader : public content::RenderProcessHostCreationObserver,
|
||||
+ public ui::SelectFileDialog::Listener {
|
||||
+ public:
|
||||
+ UserScriptLoader(const UserScriptLoader&) = delete;
|
||||
+ UserScriptLoader& operator=(const UserScriptLoader&) = delete;
|
||||
+ using LoadScriptsCallback =
|
||||
+ base::OnceCallback<void(std::unique_ptr<UserScriptList>)>;
|
||||
+ using LoadSingleScriptCallback =
|
||||
|
@ -3722,8 +3719,6 @@ new file mode 100755
|
|||
+ bool result, const std::string& error );
|
||||
+
|
||||
+ base::WeakPtrFactory<UserScriptLoader> weak_factory_{this};
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(UserScriptLoader);
|
||||
+};
|
||||
+
|
||||
+} // namespace extensions
|
||||
|
@ -3910,6 +3905,8 @@ new file mode 100644
|
|||
+
|
||||
+class PrefUpdate : public DictionaryPrefUpdate {
|
||||
+ public:
|
||||
+ PrefUpdate(const PrefUpdate&) = delete;
|
||||
+ PrefUpdate& operator=(const PrefUpdate&) = delete;
|
||||
+ PrefUpdate(PrefService* service,
|
||||
+ const std::string& id,
|
||||
+ const std::string& path)
|
||||
|
@ -3928,8 +3925,6 @@ new file mode 100644
|
|||
+
|
||||
+ private:
|
||||
+ const std::string id_;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(PrefUpdate);
|
||||
+};
|
||||
+
|
||||
+bool GetInt64FromPref(const base::DictionaryValue* dict,
|
||||
|
@ -6775,6 +6770,8 @@ new file mode 100755
|
|||
+// extension.
|
||||
+class UserScript {
|
||||
+ public:
|
||||
+ UserScript(const UserScript&) = delete;
|
||||
+ UserScript& operator=(const UserScript&) = delete;
|
||||
+ // The file extension for standalone user scripts.
|
||||
+ static const char kFileExtension[];
|
||||
+
|
||||
|
@ -7128,8 +7125,6 @@ new file mode 100755
|
|||
+
|
||||
+ // Script cannot be enabled
|
||||
+ bool force_disabled_ = false;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(UserScript);
|
||||
+};
|
||||
+
|
||||
+// Information we need while removing scripts from a UserScriptLoader.
|
||||
|
@ -8072,7 +8067,6 @@ new file mode 100755
|
|||
+#include "base/bind.h"
|
||||
+#include "base/feature_list.h"
|
||||
+#include "base/lazy_instance.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "base/metrics/histogram_macros.h"
|
||||
+#include "base/timer/elapsed_timer.h"
|
||||
+#include "base/values.h"
|
||||
|
@ -8177,6 +8171,8 @@ new file mode 100755
|
|||
+// false.
|
||||
+class ScriptInjection::FrameWatcher : public content::RenderFrameObserver {
|
||||
+ public:
|
||||
+ FrameWatcher(const FrameWatcher&) = delete;
|
||||
+ FrameWatcher& operator=(const FrameWatcher&) = delete;
|
||||
+ FrameWatcher(content::RenderFrame* render_frame,
|
||||
+ ScriptInjection* injection)
|
||||
+ : content::RenderFrameObserver(render_frame),
|
||||
|
@ -8188,8 +8184,6 @@ new file mode 100755
|
|||
+ void OnDestruct() override { injection_->invalidate_render_frame(); }
|
||||
+
|
||||
+ ScriptInjection* injection_;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(FrameWatcher);
|
||||
+};
|
||||
+
|
||||
+// static
|
||||
|
@ -8345,7 +8339,8 @@ new file mode 100755
|
|||
+ render_frame_->GetWebFrame()->RequestExecuteScript(
|
||||
+ world_id, sources, is_user_gesture,
|
||||
+ execution_option, callback.release(),
|
||||
+ blink::BackForwardCacheAware::kPossiblyDisallow);
|
||||
+ blink::BackForwardCacheAware::kPossiblyDisallow,
|
||||
+ blink::WebLocalFrame::PromiseBehavior::kDontWait);
|
||||
+}
|
||||
+
|
||||
+void ScriptInjection::OnJsInjectionCompleted(
|
||||
|
@ -9061,7 +9056,7 @@ diff --git a/components/user_scripts/renderer/script_injection_manager.h b/compo
|
|||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/renderer/script_injection_manager.h
|
||||
@@ -0,0 +1,102 @@
|
||||
@@ -0,0 +1,101 @@
|
||||
+#include <stdint.h>
|
||||
+
|
||||
+#include <map>
|
||||
|
@ -9070,7 +9065,6 @@ new file mode 100755
|
|||
+#include <vector>
|
||||
+
|
||||
+#include "base/callback.h"
|
||||
+#include "base/macros.h"
|
||||
+#include "base/scoped_observation.h"
|
||||
+#include "../common/user_script.h"
|
||||
+#include "script_injection.h"
|
||||
|
@ -9084,6 +9078,8 @@ new file mode 100755
|
|||
+// load point, and injecting them when ready.
|
||||
+class ScriptInjectionManager : public UserScriptSetManager::Observer {
|
||||
+ public:
|
||||
+ ScriptInjectionManager(const ScriptInjectionManager&) = delete;
|
||||
+ ScriptInjectionManager& operator=(const ScriptInjectionManager&) = delete;
|
||||
+ explicit ScriptInjectionManager(
|
||||
+ UserScriptSetManager* user_script_set_manager);
|
||||
+ virtual ~ScriptInjectionManager();
|
||||
|
@ -9159,8 +9155,6 @@ new file mode 100755
|
|||
+
|
||||
+ base::ScopedObservation<UserScriptSetManager, UserScriptSetManager::Observer>
|
||||
+ user_script_set_manager_observation_{this};
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(ScriptInjectionManager);
|
||||
+};
|
||||
+
|
||||
+}
|
||||
|
@ -9305,7 +9299,7 @@ diff --git a/components/user_scripts/renderer/scripts_run_info.h b/components/us
|
|||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/renderer/scripts_run_info.h
|
||||
@@ -0,0 +1,70 @@
|
||||
@@ -0,0 +1,69 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
|
@ -9319,7 +9313,6 @@ new file mode 100755
|
|||
+#include <set>
|
||||
+#include <string>
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "base/timer/elapsed_timer.h"
|
||||
+#include "../common/user_script.h"
|
||||
+
|
||||
|
@ -9331,6 +9324,8 @@ new file mode 100755
|
|||
+
|
||||
+// A struct containing information about a script run.
|
||||
+struct ScriptsRunInfo {
|
||||
+ ScriptsRunInfo(const ScriptsRunInfo&) = delete;
|
||||
+ ScriptsRunInfo& operator=(const ScriptsRunInfo&) = delete;
|
||||
+ // Map of extensions IDs to the executing script paths.
|
||||
+ typedef std::map<std::string, std::set<std::string> > ExecutingScriptsMap;
|
||||
+
|
||||
|
@ -9369,8 +9364,6 @@ new file mode 100755
|
|||
+
|
||||
+ // The url of the frame, preserved for the same reason as the routing id.
|
||||
+ GURL frame_url_;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(ScriptsRunInfo);
|
||||
+};
|
||||
+
|
||||
+} // namespace extensions
|
||||
|
@ -9613,7 +9606,7 @@ diff --git a/components/user_scripts/renderer/user_script_injector.h b/component
|
|||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/renderer/user_script_injector.h
|
||||
@@ -0,0 +1,87 @@
|
||||
@@ -0,0 +1,86 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
|
@ -9624,7 +9617,6 @@ new file mode 100755
|
|||
+#include <memory>
|
||||
+#include <string>
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "base/values.h"
|
||||
+#include "base/scoped_observation.h"
|
||||
+#include "../common/user_script.h"
|
||||
|
@ -9643,6 +9635,8 @@ new file mode 100755
|
|||
+class UserScriptInjector : public ScriptInjector,
|
||||
+ public UserScriptSet::Observer {
|
||||
+ public:
|
||||
+ UserScriptInjector(const UserScriptInjector&) = delete;
|
||||
+ UserScriptInjector& operator=(const UserScriptInjector&) = delete;
|
||||
+ UserScriptInjector(const UserScript* user_script,
|
||||
+ UserScriptSet* user_script_set);
|
||||
+ ~UserScriptInjector() override;
|
||||
|
@ -9694,8 +9688,6 @@ new file mode 100755
|
|||
+
|
||||
+ base::ScopedObservation<UserScriptSet, UserScriptSet::Observer>
|
||||
+ user_script_set_observer_{this};
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(UserScriptInjector);
|
||||
+};
|
||||
+
|
||||
+} // namespace extensions
|
||||
|
@ -9969,7 +9961,7 @@ diff --git a/components/user_scripts/renderer/user_script_set.h b/components/use
|
|||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/renderer/user_script_set.h
|
||||
@@ -0,0 +1,102 @@
|
||||
@@ -0,0 +1,101 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
|
@ -9983,7 +9975,6 @@ new file mode 100755
|
|||
+#include <string>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "base/memory/read_only_shared_memory_region.h"
|
||||
+#include "base/observer_list.h"
|
||||
+#include "../common/user_script.h"
|
||||
|
@ -10003,6 +9994,8 @@ new file mode 100755
|
|||
+// inject on a page.
|
||||
+class UserScriptSet {
|
||||
+ public:
|
||||
+ UserScriptSet(const UserScriptSet&) = delete;
|
||||
+ UserScriptSet& operator=(const UserScriptSet&) = delete;
|
||||
+ class Observer {
|
||||
+ public:
|
||||
+ // Called when the set of user scripts is updated. |changed_hosts| contains
|
||||
|
@ -10065,8 +10058,6 @@ new file mode 100755
|
|||
+
|
||||
+ // The associated observers.
|
||||
+ base::ObserverList<Observer>::Unchecked observers_;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(UserScriptSet);
|
||||
+};
|
||||
+
|
||||
+} // namespace extensions
|
||||
|
@ -10267,7 +10258,7 @@ diff --git a/components/user_scripts/renderer/user_scripts_dispatcher.h b/compon
|
|||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/renderer/user_scripts_dispatcher.h
|
||||
@@ -0,0 +1,48 @@
|
||||
@@ -0,0 +1,49 @@
|
||||
+#ifndef USERSCRIPTS_RENDER_DISPATCHER_H_
|
||||
+#define USERSCRIPTS_RENDER_DISPATCHER_H_
|
||||
+
|
||||
|
@ -10283,7 +10274,6 @@ new file mode 100755
|
|||
+#include <utility>
|
||||
+#include <vector>
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "base/scoped_observation.h"
|
||||
+#include "content/public/renderer/render_thread_observer.h"
|
||||
+#include "content/public/renderer/render_thread.h"
|
||||
|
@ -10297,6 +10287,8 @@ new file mode 100755
|
|||
+ public UserScriptSetManager::Observer {
|
||||
+
|
||||
+ public:
|
||||
+ UserScriptsDispatcher(const UserScriptsDispatcher&) = delete;
|
||||
+ UserScriptsDispatcher& operator=(const UserScriptsDispatcher&) = delete;
|
||||
+ explicit UserScriptsDispatcher();
|
||||
+ ~UserScriptsDispatcher() override;
|
||||
+
|
||||
|
@ -10316,7 +10308,6 @@ new file mode 100755
|
|||
+}
|
||||
+
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/components/user_scripts/renderer/user_scripts_renderer_client.cc b/components/user_scripts/renderer/user_scripts_renderer_client.cc
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
|
@ -10432,14 +10423,13 @@ diff --git a/components/user_scripts/renderer/user_scripts_renderer_client.h b/c
|
|||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/renderer/user_scripts_renderer_client.h
|
||||
@@ -0,0 +1,36 @@
|
||||
@@ -0,0 +1,37 @@
|
||||
+#ifndef USERSCRIPTS_RENDER_CLIENT_H_
|
||||
+#define USERSCRIPTS_RENDER_CLIENT_H_
|
||||
+
|
||||
+#include <memory>
|
||||
+#include <string>
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "user_scripts_dispatcher.h"
|
||||
+#include "services/service_manager/public/cpp/binder_registry.h"
|
||||
+
|
||||
|
@ -10447,6 +10437,8 @@ new file mode 100755
|
|||
+
|
||||
+class UserScriptsRendererClient {
|
||||
+ public:
|
||||
+ UserScriptsRendererClient(const UserScriptsRendererClient&) = delete;
|
||||
+ UserScriptsRendererClient& operator=(const UserScriptsRendererClient&) = delete;
|
||||
+ UserScriptsRendererClient();
|
||||
+ ~UserScriptsRendererClient();
|
||||
+
|
||||
|
@ -10469,7 +10461,6 @@ new file mode 100755
|
|||
+}
|
||||
+
|
||||
+#endif
|
||||
\ No newline at end of file
|
||||
diff --git a/components/user_scripts/renderer/web_ui_injection_host.cc b/components/user_scripts/renderer/web_ui_injection_host.cc
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
|
@ -10519,7 +10510,7 @@ diff --git a/components/user_scripts/renderer/web_ui_injection_host.h b/componen
|
|||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/renderer/web_ui_injection_host.h
|
||||
@@ -0,0 +1,28 @@
|
||||
@@ -0,0 +1,27 @@
|
||||
+// Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
|
@ -10527,11 +10518,12 @@ new file mode 100755
|
|||
+#ifndef USERSCRIPTS_RENDERER_WEB_UI_INJECTION_HOST_H_
|
||||
+#define USERSCRIPTS_RENDERER_WEB_UI_INJECTION_HOST_H_
|
||||
+
|
||||
+#include "base/macros.h"
|
||||
+#include "injection_host.h"
|
||||
+
|
||||
+class WebUIInjectionHost : public InjectionHost {
|
||||
+ public:
|
||||
+ WebUIInjectionHost(const WebUIInjectionHost&) = delete;
|
||||
+ WebUIInjectionHost& operator=(const WebUIInjectionHost&) = delete;
|
||||
+ WebUIInjectionHost(const HostID& host_id);
|
||||
+ ~WebUIInjectionHost() override;
|
||||
+
|
||||
|
@ -10543,8 +10535,6 @@ new file mode 100755
|
|||
+
|
||||
+ private:
|
||||
+ GURL url_;
|
||||
+
|
||||
+ DISALLOW_COPY_AND_ASSIGN(WebUIInjectionHost);
|
||||
+};
|
||||
+
|
||||
+#endif // USERSCRIPTS_RENDERER_WEB_UI_INJECTION_HOST_H_
|
||||
|
|
|
@ -107,7 +107,7 @@ new file mode 100644
|
|||
+ android:textAppearance="@style/TextAppearance.TextSmall.Secondary"
|
||||
+ app:drawableHeight="20sp"
|
||||
+ app:drawableWidth="20sp"
|
||||
+ app:chromeDrawableTint="@color/default_icon_color" />
|
||||
+ app:chromeDrawableTint="@color/default_icon_color_light" />
|
||||
+ </FrameLayout>
|
||||
+
|
||||
+ <FrameLayout
|
||||
|
@ -131,7 +131,7 @@ new file mode 100644
|
|||
+ android:textAppearance="@style/TextAppearance.TextSmall.Secondary"
|
||||
+ app:drawableHeight="20sp"
|
||||
+ app:drawableWidth="20sp"
|
||||
+ app:chromeDrawableTint="@color/default_icon_color" />
|
||||
+ app:chromeDrawableTint="@color/default_icon_color_light" />
|
||||
+ </FrameLayout>
|
||||
+</LinearLayout>
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java b/chrome/android/java/src/org/chromium/chrome/browser/feedback/ChromeFeedbackCollector.java
|
||||
|
|
Loading…
Add table
Reference in a new issue