Patches for 128 (Review) (#1362)
This commit is contained in:
@@ -18,7 +18,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
chrome/android/java/res/values/values.xml | 3 +
|
||||
.../java/res/xml/privacy_preferences.xml | 4 +
|
||||
.../privacy/settings/PrivacySettings.java | 1 +
|
||||
.../chrome_autocomplete_provider_client.cc | 2 +
|
||||
.../chrome_autocomplete_provider_client.cc | 1 +
|
||||
chrome/browser/browser_resources.grd | 3 +
|
||||
.../extensions/api/proxy/proxy_api_helpers.cc | 2 +-
|
||||
chrome/browser/net/proxy_service_factory.cc | 24 +-
|
||||
@@ -30,7 +30,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
chrome/browser/resources/proxy_config.js | 278 +++++++++++++
|
||||
chrome/browser/ui/BUILD.gn | 2 +
|
||||
.../webui/chrome_web_ui_controller_factory.cc | 3 +
|
||||
chrome/browser/ui/webui/proxy_config_ui.cc | 392 ++++++++++++++++++
|
||||
chrome/browser/ui/webui/proxy_config_ui.cc | 389 ++++++++++++++++++
|
||||
chrome/browser/ui/webui/proxy_config_ui.h | 31 ++
|
||||
chrome/common/webui_url_constants.cc | 2 +
|
||||
chrome/common/webui_url_constants.h | 2 +
|
||||
@@ -40,7 +40,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../proxy_config/proxy_policy_handler.cc | 2 +-
|
||||
net/proxy_resolution/proxy_config.cc | 51 ++-
|
||||
net/proxy_resolution/proxy_config.h | 3 +
|
||||
25 files changed, 977 insertions(+), 17 deletions(-)
|
||||
25 files changed, 973 insertions(+), 17 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
|
||||
@@ -88,12 +88,11 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/setting
|
||||
diff --git a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
--- a/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
+++ b/chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc
|
||||
@@ -319,6 +319,8 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
|
||||
@@ -319,6 +319,7 @@ ChromeAutocompleteProviderClient::GetBuiltinsToProvideAsUserTypes() {
|
||||
builtins_to_provide.push_back(chrome::kChromeUISettingsURL16);
|
||||
#endif
|
||||
builtins_to_provide.push_back(chrome::kChromeUIVersionURL16);
|
||||
+ builtins_to_provide.push_back(
|
||||
+ base::ASCIIToUTF16(chrome::kChromeUIProxyConfigURL));
|
||||
+ builtins_to_provide.push_back(chrome::kChromeUIProxyConfigURL16);
|
||||
return builtins_to_provide;
|
||||
}
|
||||
|
||||
@@ -694,7 +693,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,392 @@
|
||||
@@ -0,0 +1,389 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -756,7 +755,6 @@ new file mode 100644
|
||||
+// this class's public methods are expected to run on the UI thread.
|
||||
+class ProxyConfigMessageHandler
|
||||
+ : public WebUIMessageHandler,
|
||||
+ public base::SupportsWeakPtr<ProxyConfigMessageHandler>,
|
||||
+ public net::ProxyConfigService::Observer {
|
||||
+ public:
|
||||
+ ProxyConfigMessageHandler(const ProxyConfigMessageHandler&) = delete;
|
||||
@@ -794,12 +792,10 @@ new file mode 100644
|
||||
+
|
||||
+ void apply(const net::ProxyConfig& config);
|
||||
+
|
||||
+ base::WeakPtrFactory<ProxyConfigMessageHandler> weak_ptr_factory_;
|
||||
+ base::WeakPtrFactory<ProxyConfigMessageHandler> weak_ptr_factory_{this};
|
||||
+};
|
||||
+
|
||||
+ProxyConfigMessageHandler::ProxyConfigMessageHandler(Profile *profile)
|
||||
+ :
|
||||
+ weak_ptr_factory_(this) {
|
||||
+ProxyConfigMessageHandler::ProxyConfigMessageHandler(Profile *profile) {
|
||||
+
|
||||
+ // used to set new configuration preferences
|
||||
+ pref_service_ = g_browser_process->local_state();
|
||||
@@ -1149,7 +1145,7 @@ diff --git a/chrome/common/webui_url_constants.h b/chrome/common/webui_url_const
|
||||
inline constexpr char kChromeUINetInternalsHost[] = "net-internals";
|
||||
inline constexpr char kChromeUINetInternalsURL[] = "chrome://net-internals/";
|
||||
inline constexpr char kChromeUINewTabHost[] = "newtab";
|
||||
+inline constexpr char kChromeUIProxyConfigURL[] = "chrome://proxy/";
|
||||
+inline constexpr char16_t kChromeUIProxyConfigURL16[] = u"chrome://proxy/";
|
||||
+inline constexpr char kChromeUIProxyConfigHost[] = "proxy";
|
||||
inline constexpr char kChromeUINewTabPageHost[] = "new-tab-page";
|
||||
inline constexpr char kChromeUINewTabPageThirdPartyHost[] =
|
||||
|
||||
@@ -47,7 +47,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../tabmodel/TabModelSelectorImpl.java | 3 +
|
||||
.../browser/tabmodel/TabPersistentStore.java | 9 +
|
||||
.../browser/toolbar/ToolbarManager.java | 3 +-
|
||||
.../webapps/WebappIntentDataProvider.java | 14 ++
|
||||
.../webapps/WebappIntentDataProvider.java | 15 ++
|
||||
.../browser/android/historical_tab_saver.cc | 24 ++-
|
||||
.../chrome_autocomplete_provider_client.cc | 9 +
|
||||
.../chrome_autocomplete_provider_client.h | 1 +
|
||||
@@ -85,7 +85,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../add-an-always-incognito-mode.inc | 3 +
|
||||
.../add-an-always-incognito-mode.inc | 1 +
|
||||
net/base/file_stream_context.cc | 2 +-
|
||||
66 files changed, 780 insertions(+), 102 deletions(-)
|
||||
66 files changed, 781 insertions(+), 102 deletions(-)
|
||||
create mode 100644 chrome/android/java/res/xml/incognito_preferences.xml
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/AlwaysIncognitoLinkInterceptor.java
|
||||
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/IncognitoSettings.java
|
||||
@@ -493,7 +493,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/Cust
|
||||
|
||||
+ @Override
|
||||
+ public @CustomTabProfileType int getCustomTabMode() {
|
||||
+ return AlwaysIncognitoLinkInterceptor.isAlwaysIncognito();
|
||||
+ return AlwaysIncognitoLinkInterceptor.isAlwaysIncognito()
|
||||
+ ? CustomTabProfileType.INCOGNITO
|
||||
+ : CustomTabProfileType.REGULAR;
|
||||
+ }
|
||||
@@ -1136,17 +1136,16 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappIntentDataProvider.java
|
||||
@@ -33,6 +33,9 @@ import org.chromium.components.browser_ui.widget.TintedDrawable;
|
||||
@@ -33,6 +33,8 @@ import org.chromium.components.browser_ui.widget.TintedDrawable;
|
||||
import org.chromium.device.mojom.ScreenOrientationLockType;
|
||||
import org.chromium.ui.util.ColorUtils;
|
||||
|
||||
+import org.chromium.base.ContextUtils;
|
||||
+import org.chromium.chrome.browser.AlwaysIncognitoLinkInterceptor;
|
||||
+
|
||||
/** Stores info about a web app. */
|
||||
public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider {
|
||||
private final Drawable mCloseButtonIcon;
|
||||
@@ -45,6 +48,8 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider
|
||||
@@ -45,6 +47,8 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider
|
||||
private final ColorProviderImpl mColorProvider;
|
||||
private final ColorProviderImpl mDarkColorProvider;
|
||||
|
||||
@@ -1155,7 +1154,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappI
|
||||
/** Returns the toolbar color to use if a custom color is not specified by the webapp. */
|
||||
public static int getDefaultToolbarColor() {
|
||||
return Color.WHITE;
|
||||
@@ -80,6 +85,10 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider
|
||||
@@ -80,6 +84,10 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider
|
||||
mWebappExtras = webappExtras;
|
||||
mWebApkExtras = webApkExtras;
|
||||
mActivityType = (webApkExtras != null) ? ActivityType.WEB_APK : ActivityType.WEBAPP;
|
||||
@@ -1166,13 +1165,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappI
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -175,6 +184,11 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider
|
||||
@@ -175,6 +183,13 @@ public class WebappIntentDataProvider extends BrowserServicesIntentDataProvider
|
||||
return mWebApkExtras;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean isIncognito() {
|
||||
+ return mIsIncognito;
|
||||
+ public @CustomTabProfileType int getCustomTabMode() {
|
||||
+ return mIsIncognito
|
||||
+ ? CustomTabProfileType.INCOGNITO
|
||||
+ : CustomTabProfileType.REGULAR;
|
||||
+ }
|
||||
+
|
||||
@Override
|
||||
@@ -1849,7 +1850,7 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -195,9 +199,10 @@ public interface NativePage {
|
||||
@@ -195,7 +199,8 @@ public interface NativePage {
|
||||
* @return Type of the native page defined in {@link NativePageType}.
|
||||
*/
|
||||
private static @NativePageType int nativePageType(
|
||||
@@ -1857,11 +1858,17 @@ diff --git a/chrome/browser/ui/android/native_page/java/src/org/chromium/chrome/
|
||||
+ GURL url, NativePage candidatePage, boolean isIncognito, boolean hasPdfDownload,
|
||||
+ boolean isAlwaysIncognito) {
|
||||
if (hasPdfDownload) {
|
||||
- // For navigation with associated pdf download (e.g. open a pdf link), pdf page should
|
||||
+ // For navigation with associated pdf download (e.g. open a pdf link, isAlwaysIncognito), pdf page should
|
||||
// For navigation with associated pdf download (e.g. open a pdf link), pdf page should
|
||||
// be created.
|
||||
// Unlike other native pages, each pdf page could be different. We need to compare
|
||||
// the entire url instead of the host to determine if the pdf candidate page could
|
||||
@@ -213,7 +218,7 @@ public interface NativePage {
|
||||
// created after the pdf document is re-downloaded in other parts of the code.
|
||||
return NativePageType.NONE;
|
||||
} else {
|
||||
- return chromePageType(url, candidatePage, isIncognito);
|
||||
+ return chromePageType(url, candidatePage, isIncognito, isAlwaysIncognito);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,7 +230,7 @@ public interface NativePage {
|
||||
* which do not have chrome or chrome-native scheme.
|
||||
*/
|
||||
|
||||
@@ -15,7 +15,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../menu/bookmark_toolbar_menu_improved.xml | 14 +
|
||||
.../browser/TabbedModeTabDelegateFactory.java | 5 +-
|
||||
.../app/bookmarks/BookmarkActivity.java | 32 ++
|
||||
.../browser/bookmarks/BookmarkBridge.java | 285 +++++++++++++++++
|
||||
.../browser/bookmarks/BookmarkBridge.java | 285 ++++++++++++++++++
|
||||
.../browser/bookmarks/BookmarkDelegate.java | 10 +
|
||||
.../bookmarks/BookmarkManagerCoordinator.java | 9 +
|
||||
.../bookmarks/BookmarkManagerMediator.java | 23 ++
|
||||
@@ -26,8 +26,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../bookmarks/BookmarkToolbarViewBinder.java | 6 +
|
||||
.../native_page/NativePageFactory.java | 11 +-
|
||||
chrome/browser/BUILD.gn | 11 +-
|
||||
.../bookmarks/android/bookmark_bridge.cc | 287 ++++++++++++++++++
|
||||
.../bookmarks/android/bookmark_bridge.h | 30 +-
|
||||
.../bookmarks/android/bookmark_bridge.cc | 282 +++++++++++++++++
|
||||
.../bookmarks/android/bookmark_bridge.h | 29 +-
|
||||
.../browser/bookmarks/bookmark_html_writer.cc | 11 +
|
||||
.../dialogs/DownloadLocationCustomView.java | 8 +-
|
||||
.../DownloadLocationDialogCoordinator.java | 10 +-
|
||||
@@ -53,7 +53,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
ui/shell_dialogs/select_file_dialog_linux.cc | 4 +
|
||||
ui/shell_dialogs/select_file_dialog_linux.h | 2 +
|
||||
ui/shell_dialogs/select_file_dialog_win.cc | 5 +
|
||||
42 files changed, 919 insertions(+), 30 deletions(-)
|
||||
42 files changed, 913 insertions(+), 30 deletions(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/add-bookmark-import-export-actions.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/add-bookmark-import-export-actions.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/add-bookmark-import-export-actions.inc
|
||||
@@ -878,7 +878,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
// Must come after all headers that specialize FromJniType() / ToJniType().
|
||||
#include "chrome/android/chrome_jni_headers/BookmarkBridge_jni.h"
|
||||
|
||||
@@ -77,12 +99,96 @@ using bookmarks::android::JavaBookmarkIdGetType;
|
||||
@@ -77,12 +99,97 @@ using bookmarks::android::JavaBookmarkIdGetType;
|
||||
using content::BrowserThread;
|
||||
using power_bookmarks::PowerBookmarkMeta;
|
||||
|
||||
@@ -910,14 +910,15 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
+ return true;
|
||||
+
|
||||
+ GURL fixed_url(url_formatter::FixupURL(url.spec(), std::string()));
|
||||
+ for (size_t i = 0; i < chrome::kNumberOfChromeHostURLs; ++i) {
|
||||
+ if (fixed_url.DomainIs(chrome::kChromeHostURLs[i]))
|
||||
+ const base::span<const base::cstring_view> hosts = chrome::ChromeURLHosts();
|
||||
+ for (const base::cstring_view host : hosts) {
|
||||
+ if (fixed_url.DomainIs(host)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ for (size_t i = 0; i < chrome::kNumberOfChromeDebugURLs; ++i) {
|
||||
+ if (fixed_url == chrome::kChromeDebugURLs[i])
|
||||
+ return true;
|
||||
+ if (base::Contains(chrome::ChromeDebugURLs(), fixed_url)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ // If url has either chrome:// or about: schemes but wasn't found in the
|
||||
@@ -975,7 +976,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
class BookmarkTitleComparer {
|
||||
public:
|
||||
explicit BookmarkTitleComparer(BookmarkBridge* bookmark_bridge,
|
||||
@@ -223,6 +329,10 @@ BookmarkBridge::~BookmarkBridge() {
|
||||
@@ -223,6 +330,10 @@ BookmarkBridge::~BookmarkBridge() {
|
||||
partner_bookmarks_shim_observation_.Reset();
|
||||
bookmark_model_observation_.Reset();
|
||||
profile_observation_.Reset();
|
||||
@@ -986,7 +987,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
}
|
||||
|
||||
void BookmarkBridge::Destroy(JNIEnv* env) {
|
||||
@@ -762,6 +872,183 @@ jint BookmarkBridge::GetTotalBookmarkCount(
|
||||
@@ -762,6 +873,177 @@ jint BookmarkBridge::GetTotalBookmarkCount(
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -1007,10 +1008,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
+ ui::SelectFileDialog::FileTypeInfo file_type_info;
|
||||
+
|
||||
+ const std::vector<std::u16string> v_accept_types = { u"text/html" };
|
||||
+
|
||||
+ // Android needs the original MIME types and an additional capture value.
|
||||
+ std::pair<std::vector<std::u16string>, bool> accept_types =
|
||||
+ std::make_pair(v_accept_types, /* use_media_capture */ false);
|
||||
+ select_file_dialog_->SetAcceptTypes(v_accept_types);
|
||||
+
|
||||
+ select_file_dialog_->SelectFile(
|
||||
+ ui::SelectFileDialog::SELECT_OPEN_FILE,
|
||||
@@ -1019,8 +1017,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
+ &file_type_info,
|
||||
+ 0,
|
||||
+ base::FilePath::StringType(),
|
||||
+ window,
|
||||
+ &accept_types
|
||||
+ window
|
||||
+ );
|
||||
+}
|
||||
+
|
||||
@@ -1068,8 +1065,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
+ return std::make_unique<TemplateURL>(data);
|
||||
+}
|
||||
+
|
||||
+void BookmarkBridge::FileSelected(const ui::SelectedFileInfo& file, int index,
|
||||
+ void* params) {
|
||||
+void BookmarkBridge::FileSelected(const ui::SelectedFileInfo& file, int index) {
|
||||
+ base::FilePath path = file.path();
|
||||
+ base::ThreadPool::PostTaskAndReplyWithResult(
|
||||
+ FROM_HERE, {base::TaskPriority::BEST_EFFORT, base::MayBlock()},
|
||||
@@ -1164,8 +1160,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
+ LOG(INFO) << result;
|
||||
+}
|
||||
+
|
||||
+void BookmarkBridge::FileSelectionCanceled(void* params) {
|
||||
+}
|
||||
+void BookmarkBridge::FileSelectionCanceled() {}
|
||||
+
|
||||
void BookmarkBridge::SetBookmarkTitle(JNIEnv* env,
|
||||
jlong id,
|
||||
@@ -1201,20 +1196,19 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser
|
||||
public:
|
||||
// All of the injected pointers must be non-null and must outlive `this`.
|
||||
BookmarkBridge(Profile* profile,
|
||||
@@ -81,6 +86,12 @@ class BookmarkBridge : public ProfileObserver,
|
||||
@@ -81,6 +86,11 @@ class BookmarkBridge : public ProfileObserver,
|
||||
|
||||
bool IsDoingExtensiveChanges(JNIEnv* env);
|
||||
|
||||
+ // SelectFileDialog::Listener implementation.
|
||||
+ void FileSelected(const ui::SelectedFileInfo& file,
|
||||
+ int index,
|
||||
+ void* params) override;
|
||||
+ void FileSelectionCanceled(void* params) override;
|
||||
+ int index) override;
|
||||
+ void FileSelectionCanceled() override;
|
||||
+
|
||||
jboolean IsEditBookmarksEnabled(JNIEnv* env);
|
||||
|
||||
void LoadEmptyPartnerBookmarkShimForTesting(JNIEnv* env);
|
||||
@@ -93,6 +104,15 @@ class BookmarkBridge : public ProfileObserver,
|
||||
@@ -93,6 +103,15 @@ class BookmarkBridge : public ProfileObserver,
|
||||
jlong id,
|
||||
jint type);
|
||||
|
||||
@@ -1230,7 +1224,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser
|
||||
void GetAllFoldersWithDepths(
|
||||
JNIEnv* env,
|
||||
const base::android::JavaParamRef<jobject>& j_folders_obj,
|
||||
@@ -363,6 +383,9 @@ class BookmarkBridge : public ProfileObserver,
|
||||
@@ -363,6 +382,9 @@ class BookmarkBridge : public ProfileObserver,
|
||||
void CreateOrDestroyAccountReadingListManagerIfNeeded();
|
||||
|
||||
const raw_ptr<Profile> profile_; // weak
|
||||
@@ -1240,7 +1234,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser
|
||||
base::android::ScopedJavaGlobalRef<jobject> java_bookmark_model_;
|
||||
const raw_ptr<bookmarks::BookmarkModel> bookmark_model_; // weak
|
||||
const raw_ptr<bookmarks::ManagedBookmarkService>
|
||||
@@ -377,6 +400,7 @@ class BookmarkBridge : public ProfileObserver,
|
||||
@@ -377,6 +399,7 @@ class BookmarkBridge : public ProfileObserver,
|
||||
std::unique_ptr<bookmarks::ScopedGroupBookmarkActions>
|
||||
grouped_bookmark_actions_;
|
||||
PrefChangeRegistrar pref_change_registrar_;
|
||||
@@ -1248,7 +1242,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser
|
||||
|
||||
// Information about the Partner bookmarks (must check for IsLoaded()).
|
||||
// This is owned by profile.
|
||||
@@ -408,6 +432,10 @@ class BookmarkBridge : public ProfileObserver,
|
||||
@@ -408,6 +431,10 @@ class BookmarkBridge : public ProfileObserver,
|
||||
|
||||
bool suppress_observer_notifications_ = false;
|
||||
|
||||
|
||||
@@ -993,10 +993,10 @@ new file mode 100644
|
||||
diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_state.cc
|
||||
--- a/components/flags_ui/flags_state.cc
|
||||
+++ b/components/flags_ui/flags_state.cc
|
||||
@@ -361,6 +361,21 @@ void FlagsState::GetSwitchesAndFeaturesFromFlags(
|
||||
@@ -360,6 +360,21 @@ void FlagsState::GetSwitchesAndFeaturesFromFlags(
|
||||
|
||||
for (const std::string& entry_name : enabled_entries) {
|
||||
const auto& entry_it = name_to_switch_map.find(entry_name);
|
||||
CHECK(entry_it != name_to_switch_map.end(), base::NotFatalUntil::M130);
|
||||
+ if (entry_it == name_to_switch_map.end()) {
|
||||
+ // check if is a cromite feature
|
||||
+ std::string::size_type pos = entry_name.find('@');
|
||||
@@ -1012,9 +1012,9 @@ diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_stat
|
||||
+ }
|
||||
+ NOTREACHED_NORETURN();
|
||||
+ }
|
||||
CHECK(entry_it != name_to_switch_map.end(), base::NotFatalUntil::M130);
|
||||
|
||||
const SwitchEntry& entry = entry_it->second;
|
||||
if (!entry.switch_name.empty())
|
||||
@@ -677,6 +692,27 @@ void FlagsState::GetFlagFeatureEntries(
|
||||
data.Set("links", std::move(links));
|
||||
}
|
||||
|
||||
@@ -7,9 +7,9 @@ Allows build with clangd by suppressing unsupported parameters
|
||||
Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
build/config/compiler/BUILD.gn | 10 +++++++++-
|
||||
build/config/compiler/BUILD.gn | 11 ++++++++++-
|
||||
build_overrides/build.gni | 3 +++
|
||||
2 files changed, 12 insertions(+), 1 deletion(-)
|
||||
2 files changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
@@ -22,7 +22,7 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
cflags_cc += [
|
||||
# TODO(crbug.com/328490295): Fix and re-enable for C flags.
|
||||
"-Wenum-compare-conditional",
|
||||
@@ -1965,6 +1964,15 @@ config("default_warnings") {
|
||||
@@ -1965,6 +1964,16 @@ config("default_warnings") {
|
||||
# TODO(crbug.com/344680447): Fix and re-enable.
|
||||
cflags_cc += [ "-Wno-missing-template-arg-list-after-template-kw" ]
|
||||
}
|
||||
@@ -33,6 +33,7 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
|
||||
+ ]
|
||||
+ cflags_cc -= [
|
||||
+ "-Wno-c++11-narrowing-const-reference",
|
||||
+ "-Wno-missing-template-arg-list-after-template-kw",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/Bookm
|
||||
diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browser/bookmarks/android/bookmark_bridge.cc
|
||||
--- a/chrome/browser/bookmarks/android/bookmark_bridge.cc
|
||||
+++ b/chrome/browser/bookmarks/android/bookmark_bridge.cc
|
||||
@@ -178,7 +178,7 @@ class FileBookmarksExportObserver: public BookmarksExportObserver {
|
||||
@@ -179,7 +179,7 @@ class FileBookmarksExportObserver: public BookmarksExportObserver {
|
||||
|
||||
JNIEnv* env = AttachCurrentThread();
|
||||
Java_BookmarkBridge_bookmarksExported(env, obj_, window_->GetJavaObject(),
|
||||
@@ -229,7 +229,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
result == Result::kSuccess);
|
||||
delete this;
|
||||
}
|
||||
@@ -349,6 +349,33 @@ jboolean BookmarkBridge::AreAccountBookmarkFoldersActive(JNIEnv* env) {
|
||||
@@ -350,6 +350,33 @@ jboolean BookmarkBridge::AreAccountBookmarkFoldersActive(JNIEnv* env) {
|
||||
return bookmark_model_->account_mobile_node() != nullptr;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
base::android::ScopedJavaLocalRef<jobject>
|
||||
BookmarkBridge::GetMostRecentlyAddedUserBookmarkIdForUrl(JNIEnv* env,
|
||||
const GURL& url) {
|
||||
@@ -461,6 +488,7 @@ void BookmarkBridge::GetAllFoldersWithDepths(
|
||||
@@ -462,6 +489,7 @@ void BookmarkBridge::GetAllFoldersWithDepths(
|
||||
// Vector to temporarily contain all child bookmarks at same level for sorting
|
||||
std::vector<const BookmarkNode*> bookmarks = {
|
||||
bookmark_model_->mobile_node(),
|
||||
@@ -271,7 +271,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
bookmark_model_->bookmark_bar_node(),
|
||||
bookmark_model_->other_node(),
|
||||
};
|
||||
@@ -554,6 +582,9 @@ std::vector<const BookmarkNode*> BookmarkBridge::GetTopLevelFolderIdsImpl(
|
||||
@@ -555,6 +583,9 @@ std::vector<const BookmarkNode*> BookmarkBridge::GetTopLevelFolderIdsImpl(
|
||||
top_level_folders.push_back(other_node);
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.cc b/chrome/browse
|
||||
const BookmarkNode* reading_list_node =
|
||||
local_or_syncable_reading_list_manager_->GetRoot();
|
||||
if (IsPermanentFolderVisible(ignore_visibility, reading_list_node)) {
|
||||
@@ -1266,6 +1297,17 @@ void BookmarkBridge::GetBookmarksOfType(
|
||||
@@ -1261,6 +1292,17 @@ void BookmarkBridge::GetBookmarksOfType(
|
||||
AddBookmarkNodesToBookmarkIdList(env, j_list, results);
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ diff --git a/chrome/browser/bookmarks/android/bookmark_bridge.h b/chrome/browser
|
||||
base::android::ScopedJavaLocalRef<jobject>
|
||||
GetMostRecentlyAddedUserBookmarkIdForUrl(JNIEnv* env, const GURL& url);
|
||||
const bookmarks::BookmarkNode* GetMostRecentlyAddedUserBookmarkIdForUrlImpl(
|
||||
@@ -223,6 +227,10 @@ class BookmarkBridge : public ProfileObserver,
|
||||
@@ -222,6 +226,10 @@ class BookmarkBridge : public ProfileObserver,
|
||||
const base::android::JavaParamRef<jobject>& j_list,
|
||||
jint type);
|
||||
|
||||
|
||||
@@ -7,36 +7,36 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../start_surface/StartSurfaceMediator.java | 5 +++-
|
||||
.../layout/custom_tabs_control_container.xml | 2 +-
|
||||
.../java/res/layout/recent_tabs_page.xml | 2 +-
|
||||
.../java/res/values-sw600dp/dimens.xml | 4 +--
|
||||
chrome/android/java/res/values/dimens.xml | 6 +++-
|
||||
.../java/res/values-sw600dp/dimens.xml | 4 ++--
|
||||
chrome/android/java/res/values/dimens.xml | 6 ++++-
|
||||
.../chrome/browser/WarmupManager.java | 5 +++-
|
||||
.../settings/AccessibilitySettings.java | 13 +++++++++
|
||||
.../ChromeAccessibilitySettingsDelegate.java | 19 +++++++++++++
|
||||
.../chrome/browser/app/ChromeActivity.java | 4 ++-
|
||||
.../overlays/strip/StripLayoutHelper.java | 10 +++++--
|
||||
.../strip/StripLayoutHelperManager.java | 7 ++++-
|
||||
.../tabbed_mode/TabbedRootUiCoordinator.java | 4 ++-
|
||||
.../settings/AccessibilitySettings.java | 13 ++++++++++
|
||||
.../ChromeAccessibilitySettingsDelegate.java | 19 +++++++++++++++
|
||||
.../chrome/browser/app/ChromeActivity.java | 4 +++-
|
||||
.../overlays/strip/StripLayoutHelper.java | 10 ++++++--
|
||||
.../strip/StripLayoutHelperManager.java | 7 +++++-
|
||||
.../tabbed_mode/TabbedRootUiCoordinator.java | 4 +++-
|
||||
.../chrome/browser/ui/RootUiCoordinator.java | 5 +++-
|
||||
chrome/browser/preferences/BUILD.gn | 1 +
|
||||
.../preferences/ChromePreferenceKeys.java | 1 +
|
||||
.../preferences/ChromeSharedPreferences.java | 8 ++++++
|
||||
.../preferences/ChromeSharedPreferences.java | 8 +++++++
|
||||
.../LegacyChromePreferenceKeys.java | 1 +
|
||||
.../SingleTabSwitcherOnNtpMediator.java | 1 +
|
||||
.../omnibox/LocationBarCoordinator.java | 2 +-
|
||||
.../strings/android_chrome_strings.grd | 7 +++++
|
||||
.../java/res/layout/control_container.xml | 10 +++----
|
||||
.../strings/android_chrome_strings.grd | 7 ++++++
|
||||
.../java/res/layout/control_container.xml | 10 ++++----
|
||||
.../java/res/layout/toolbar_tablet.xml | 2 +-
|
||||
.../java/res/values-sw600dp/dimens.xml | 5 ++--
|
||||
.../toolbar/java/res/values/dimens.xml | 5 ++--
|
||||
.../browser/toolbar/ControlContainer.java | 2 +-
|
||||
.../toolbar/top/ToolbarControlContainer.java | 28 ++++++++++++++++++-
|
||||
.../toolbar/top/ToolbarControlContainer.java | 24 ++++++++++++++++++-
|
||||
.../browser/toolbar/top/ToolbarLayout.java | 5 +++-
|
||||
.../TabStripTransitionCoordinator.java | 2 +-
|
||||
components/BUILD.gn | 6 ++--
|
||||
components/BUILD.gn | 6 ++---
|
||||
.../res/xml/accessibility_preferences.xml | 5 ++++
|
||||
.../AccessibilitySettingsDelegate.java | 11 ++++++++
|
||||
.../chromium/ui/base/DeviceFormFactor.java | 9 ++++++
|
||||
32 files changed, 166 insertions(+), 31 deletions(-)
|
||||
.../AccessibilitySettingsDelegate.java | 11 +++++++++
|
||||
.../chromium/ui/base/DeviceFormFactor.java | 9 +++++++
|
||||
32 files changed, 162 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java b/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java
|
||||
--- a/chrome/android/features/start_surface/java/src/org/chromium/chrome/features/start_surface/StartSurfaceMediator.java
|
||||
@@ -525,7 +525,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.Rect;
|
||||
@@ -119,8 +120,33 @@ public class ToolbarControlContainer extends OptimizedFrameLayout
|
||||
@@ -119,8 +120,29 @@ public class ToolbarControlContainer extends OptimizedFrameLayout
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -552,10 +552,6 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
|
||||
+ view = findViewById(R.id.target_view_stub);
|
||||
+ if (view != null)
|
||||
+ ((MarginLayoutParams)view.getLayoutParams()).topMargin = tab_strip_height;
|
||||
+
|
||||
+ view = findViewById(R.id.tab_switcher_toolbar_stub);
|
||||
+ if (view != null)
|
||||
+ ((MarginLayoutParams)view.getLayoutParams()).topMargin = tab_strip_height;
|
||||
+ }
|
||||
mToolbarContainer =
|
||||
(ToolbarViewResourceFrameLayout) findViewById(R.id.toolbar_container);
|
||||
|
||||
@@ -13,13 +13,13 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../ChromeAccessibilitySettingsDelegate.java | 18 ++++++++++
|
||||
.../contextmenu/ChromeContextMenuItem.java | 5 ++-
|
||||
.../ChromeContextMenuPopulator.java | 5 +++
|
||||
.../tab/TabContextMenuItemDelegate.java | 9 +++++
|
||||
.../tab/TabContextMenuItemDelegate.java | 8 +++++
|
||||
.../flags/android/chrome_feature_list.cc | 1 +
|
||||
.../browser/flags/ChromeFeatureList.java | 5 +++
|
||||
.../strings/android_chrome_strings.grd | 9 +++++
|
||||
.../res/xml/accessibility_preferences.xml | 5 +++
|
||||
.../AccessibilitySettingsDelegate.java | 2 ++
|
||||
.../contextmenu/ContextMenuItemDelegate.java | 2 ++
|
||||
.../contextmenu/ContextMenuItemDelegate.java | 3 ++
|
||||
...Add-setting-to-invert-tap-and-long-tap.inc | 8 +++++
|
||||
...Add-setting-to-invert-tap-and-long-tap.inc | 3 ++
|
||||
...Add-setting-to-invert-tap-and-long-tap.inc | 1 +
|
||||
@@ -164,7 +164,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/Chr
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
|
||||
@@ -328,11 +328,20 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate {
|
||||
@@ -328,6 +328,14 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate {
|
||||
mTab.loadUrl(loadUrlParams);
|
||||
}
|
||||
|
||||
@@ -179,12 +179,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextM
|
||||
/**
|
||||
* Called when the {@code url} is of an image and should be opened in a new page.
|
||||
*
|
||||
* @param url The image URL to open.
|
||||
*/
|
||||
+ @Override
|
||||
public void onOpenImageInNewTab(GURL url, Referrer referrer) {
|
||||
LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec());
|
||||
loadUrlParams.setReferrer(referrer);
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -281,7 +275,15 @@ diff --git a/components/browser_ui/accessibility/android/java/src/org/chromium/c
|
||||
diff --git a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/contextmenu/ContextMenuItemDelegate.java b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/contextmenu/ContextMenuItemDelegate.java
|
||||
--- a/components/embedder_support/android/java/src/org/chromium/components/embedder_support/contextmenu/ContextMenuItemDelegate.java
|
||||
+++ b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/contextmenu/ContextMenuItemDelegate.java
|
||||
@@ -148,6 +148,8 @@ public interface ContextMenuItemDelegate {
|
||||
@@ -9,6 +9,7 @@ import android.net.Uri;
|
||||
import androidx.annotation.IntDef;
|
||||
|
||||
import org.chromium.content_public.browser.WebContents;
|
||||
+import org.chromium.content_public.common.Referrer;
|
||||
import org.chromium.url.GURL;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
@@ -148,6 +149,8 @@ public interface ContextMenuItemDelegate {
|
||||
*/
|
||||
GURL getPageUrl();
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
base/android/content_uri_utils.cc | 10 ++++++
|
||||
base/android/content_uri_utils.h | 4 +++
|
||||
.../org/chromium/base/ContentUriUtils.java | 33 +++++++++++++++++++
|
||||
3 files changed, 47 insertions(+)
|
||||
.../org/chromium/base/ContentUriUtils.java | 34 +++++++++++++++++++
|
||||
3 files changed, 48 insertions(+)
|
||||
|
||||
diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils.cc
|
||||
--- a/base/android/content_uri_utils.cc
|
||||
@@ -49,7 +49,15 @@ diff --git a/base/android/content_uri_utils.h b/base/android/content_uri_utils.h
|
||||
diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
--- a/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
+++ b/base/android/java/src/org/chromium/base/ContentUriUtils.java
|
||||
@@ -22,6 +22,9 @@ import org.jni_zero.CalledByNative;
|
||||
@@ -10,6 +10,7 @@ import android.content.res.AssetFileDescriptor;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
+import android.os.ParcelFileDescriptor;
|
||||
import android.provider.DocumentsContract;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
@@ -22,6 +23,9 @@ import org.jni_zero.CalledByNative;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -59,7 +67,7 @@ diff --git a/base/android/java/src/org/chromium/base/ContentUriUtils.java b/base
|
||||
/** This class provides methods to access content URI schemes. */
|
||||
public abstract class ContentUriUtils {
|
||||
private static final String TAG = "ContentUriUtils";
|
||||
@@ -86,6 +89,36 @@ public abstract class ContentUriUtils {
|
||||
@@ -86,6 +90,36 @@ public abstract class ContentUriUtils {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ Enabled by default
|
||||
.../platform/graphics/bitmap_image_metrics.h | 4 +-
|
||||
.../renderer/platform/image-decoders/BUILD.gn | 9 +
|
||||
.../platform/image-decoders/image_decoder.cc | 23 +
|
||||
.../image-decoders/jxl/jxl_image_decoder.cc | 685 ++++++++++++++++++
|
||||
.../image-decoders/jxl/jxl_image_decoder.cc | 686 ++++++++++++++++++
|
||||
.../image-decoders/jxl/jxl_image_decoder.h | 123 ++++
|
||||
.../jxl/jxl_image_decoder_test.cc | 626 ++++++++++++++++
|
||||
.../blink/tools/commit_stats/git-dirs.txt | 1 +
|
||||
@@ -58,7 +58,7 @@ Enabled by default
|
||||
.../libjxl/gen_headers/jxl/jxl_export.h | 11 +
|
||||
tools/metrics/histograms/enums.xml | 1 +
|
||||
.../histograms/metadata/blink/enums.xml | 2 +-
|
||||
53 files changed, 1997 insertions(+), 17 deletions(-)
|
||||
53 files changed, 1998 insertions(+), 17 deletions(-)
|
||||
create mode 100644 build/linux/unbundle/libjxl.gn
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Add-support-to-jxl.inc
|
||||
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Add-support-to-jxl.inc
|
||||
@@ -758,7 +758,7 @@ diff --git a/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_de
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/third_party/blink/renderer/platform/image-decoders/jxl/jxl_image_decoder.cc
|
||||
@@ -0,0 +1,685 @@
|
||||
@@ -0,0 +1,686 @@
|
||||
+// Copyright 2021 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
@@ -785,9 +785,10 @@ new file mode 100644
|
||||
+ const skcms_TransferFunction& tf) {
|
||||
+ // Override the transfer function with a known parametric curve.
|
||||
+ profile.has_trc = true;
|
||||
+ auto list = base::span(profile.trc);
|
||||
+ for (int c = 0; c < 3; c++) {
|
||||
+ profile.trc[c].table_entries = 0;
|
||||
+ profile.trc[c].parametric = tf;
|
||||
+ list[c].table_entries = 0;
|
||||
+ list[c].parametric = tf;
|
||||
+ }
|
||||
+ return profile;
|
||||
+}
|
||||
@@ -1550,7 +1551,7 @@ new file mode 100644
|
||||
+ bool have_color_info_ = false;
|
||||
+
|
||||
+ // Preserved for JXL pixel callback. Not owned.
|
||||
+ ColorProfileTransform* xform_;
|
||||
+ raw_ptr<ColorProfileTransform> xform_;
|
||||
+
|
||||
+ // Fields for animation support.
|
||||
+
|
||||
|
||||
@@ -6,17 +6,25 @@ Allow documentPiP api use only with content setting popup allowed
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../picture_in_picture_controller_impl.cc | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
.../picture_in_picture_controller_impl.cc | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc b/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc
|
||||
--- a/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc
|
||||
+++ b/third_party/blink/renderer/modules/document_picture_in_picture/picture_in_picture_controller_impl.cc
|
||||
@@ -383,6 +383,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow(
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "third_party/blink/renderer/core/html/media/html_media_element.h"
|
||||
#include "third_party/blink/renderer/core/html/media/html_video_element.h"
|
||||
#include "third_party/blink/renderer/core/layout/layout_video.h"
|
||||
+#include "third_party/blink/renderer/core/loader/document_loader.h"
|
||||
#include "third_party/blink/renderer/modules/picture_in_picture/picture_in_picture_event.h"
|
||||
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
@@ -383,6 +384,13 @@ void PictureInPictureControllerImpl::CreateDocumentPictureInPictureWindow(
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (!opener.GetFrame()->GetContentSettings()->allow_popup) {
|
||||
+ if (!opener.GetFrame()->Loader().GetDocumentLoader()->GetContentSettings()->allow_popup) {
|
||||
+ exception_state.ThrowDOMException(DOMExceptionCode::kNotAllowedError,
|
||||
+ "Document PiP requires user popup permission");
|
||||
+ resolver->Reject(exception_state);
|
||||
|
||||
@@ -15,16 +15,16 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../Allow-building-without-enable_reporting.inc | 2 ++
|
||||
net/base/features.cc | 1 +
|
||||
net/reporting/reporting_service.cc | 6 ++++++
|
||||
services/network/network_context.h | 4 ++--
|
||||
services/network/network_context.h | 6 +++---
|
||||
services/network/public/mojom/BUILD.gn | 1 -
|
||||
.../network/public/mojom/network_context.mojom | 2 ++
|
||||
.../network/public/mojom/network_context.mojom | 3 +++
|
||||
.../core/frame/csp/content_security_policy.cc | 3 +++
|
||||
.../blink/renderer/core/frame/local_frame.cc | 3 +++
|
||||
.../blink/renderer/core/frame/local_frame.h | 4 +++-
|
||||
.../renderer/core/frame/reporting_context.cc | 9 +++++++++
|
||||
.../renderer/core/frame/reporting_context.h | 7 +++++--
|
||||
.../renderer/core/frame/reporting_observer.cc | 3 +--
|
||||
20 files changed, 58 insertions(+), 25 deletions(-)
|
||||
20 files changed, 60 insertions(+), 26 deletions(-)
|
||||
create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Allow-building-without-enable_reporting.inc
|
||||
|
||||
diff --git a/chrome/browser/net/chrome_report_sender.cc b/chrome/browser/net/chrome_report_sender.cc
|
||||
@@ -281,7 +281,12 @@ diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_servic
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -467,10 +467,10 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -463,14 +463,14 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
const GURL& url,
|
||||
const std::optional<base::UnguessableToken>& reporting_source,
|
||||
const net::NetworkAnonymizationKey& network_anonymization_key,
|
||||
- base::Value::Dict body) override;
|
||||
+ base::Value::Dict body);
|
||||
void QueueEnterpriseReport(const std::string& type,
|
||||
const std::string& group,
|
||||
const GURL& url,
|
||||
@@ -316,7 +321,15 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw
|
||||
QueueReport(string type,
|
||||
string group,
|
||||
url.mojom.Url url,
|
||||
@@ -1258,6 +1259,7 @@ interface NetworkContext {
|
||||
@@ -1248,6 +1249,7 @@ interface NetworkContext {
|
||||
NetworkAnonymizationKey network_anonymization_key,
|
||||
mojo_base.mojom.DictionaryValue body);
|
||||
|
||||
+ [EnableIf=enable_reporting]
|
||||
QueueEnterpriseReport(string type,
|
||||
string group,
|
||||
url.mojom.Url url,
|
||||
@@ -1258,6 +1260,7 @@ interface NetworkContext {
|
||||
// Note that this queued report will never be delivered if no reporting
|
||||
// endpoint matching is registered for with the provided
|
||||
// |network_isolation_key|.
|
||||
|
||||
@@ -90,7 +90,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/in
|
||||
+import org.chromium.chrome.browser.ui.messages.snackbar.SnackbarManager;
|
||||
+import org.chromium.chrome.browser.ui.messages.snackbar.INeedSnackbarManager;
|
||||
+import org.chromium.chrome.browser.ui.messages.snackbar.Snackbar;
|
||||
+import org.chromium.chrome.browser.tasks.tab_management.TabSwitcherLayout;
|
||||
+import org.chromium.chrome.browser.hub.HubLayout;
|
||||
+import org.chromium.chrome.browser.tab.Tab;
|
||||
+import org.chromium.chrome.browser.tabmodel.TabModelUtils;
|
||||
+import org.chromium.chrome.browser.tabmodel.TabModelSelector;
|
||||
@@ -205,7 +205,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/in
|
||||
+ // TabWindowManager.Observer
|
||||
+ @Override
|
||||
+ public void onSceneChange(Layout layout) {
|
||||
+ if (!(layout instanceof TabSwitcherLayout)) {
|
||||
+ if (!(layout instanceof HubLayout)) {
|
||||
+ SnackbarManager snackbarManager = mSnackbarManagerSupplier.get();
|
||||
+ snackbarManager.dismissSnackbars(this);
|
||||
+ }
|
||||
|
||||
@@ -112,7 +112,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layo
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabContextMenuItemDelegate.java
|
||||
@@ -345,8 +345,13 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate {
|
||||
@@ -344,8 +344,13 @@ public class TabContextMenuItemDelegate implements ContextMenuItemDelegate {
|
||||
public void onOpenImageInNewTab(GURL url, Referrer referrer) {
|
||||
LoadUrlParams loadUrlParams = new LoadUrlParams(url.getSpec());
|
||||
loadUrlParams.setReferrer(referrer);
|
||||
|
||||
@@ -11,6 +11,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../optimization_guide/chrome_hints_manager.cc | 1 +
|
||||
.../model_validator_keyed_service.cc | 6 +++++-
|
||||
.../optimization_guide_keyed_service.cc | 1 -
|
||||
.../predictors/autocomplete_action_predictor.cc | 2 ++
|
||||
.../predictors/loading_predictor_config.cc | 4 ++--
|
||||
chrome/browser/predictors/predictors_features.cc | 3 +--
|
||||
chrome/browser/ui/tab_helpers.cc | 1 -
|
||||
@@ -27,7 +28,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
components/optimization_guide/features.gni | 3 +--
|
||||
.../core/page_content_annotations_features.cc | 5 +++++
|
||||
components/search/ntp_features.cc | 3 +++
|
||||
.../Disable-all-predictors-code.inc | 4 ++++
|
||||
.../Disable-all-predictors-code.inc | 3 +++
|
||||
.../Disable-all-predictors-code.inc | 1 +
|
||||
.../features_cc/Disable-all-predictors-code.inc | 4 ++++
|
||||
.../features_cc/Disable-all-predictors-code.inc | 1 +
|
||||
@@ -35,7 +36,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
services/webnn/features.gni | 2 +-
|
||||
.../document_speculation_rules.cc | 1 +
|
||||
.../platform/runtime_enabled_features.json5 | 2 +-
|
||||
30 files changed, 67 insertions(+), 35 deletions(-)
|
||||
31 files changed, 68 insertions(+), 35 deletions(-)
|
||||
create mode 100644 cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc
|
||||
create mode 100644 cromite_flags/chrome/common/chrome_features_cc/Disable-all-predictors-code.inc
|
||||
create mode 100644 cromite_flags/components/permissions/features_cc/Disable-all-predictors-code.inc
|
||||
@@ -165,6 +166,18 @@ diff --git a/chrome/browser/optimization_guide/optimization_guide_keyed_service.
|
||||
}
|
||||
|
||||
optimization_guide::OptimizationGuideDecision
|
||||
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.cc b/chrome/browser/predictors/autocomplete_action_predictor.cc
|
||||
--- a/chrome/browser/predictors/autocomplete_action_predictor.cc
|
||||
+++ b/chrome/browser/predictors/autocomplete_action_predictor.cc
|
||||
@@ -209,6 +209,8 @@ void AutocompleteActionPredictor::StartPrerendering(
|
||||
|
||||
SetIsNavigationInDomainCallback(preloading_data);
|
||||
|
||||
+ if ((true)) return; // was kOmniboxTriggerForPrerender2
|
||||
+
|
||||
// Create new PreloadingAttempt and pass all the values corresponding to this
|
||||
// prerendering attempt for Prerender.
|
||||
content::PreloadingAttempt* preloading_attempt =
|
||||
diff --git a/chrome/browser/predictors/loading_predictor_config.cc b/chrome/browser/predictors/loading_predictor_config.cc
|
||||
--- a/chrome/browser/predictors/loading_predictor_config.cc
|
||||
+++ b/chrome/browser/predictors/loading_predictor_config.cc
|
||||
@@ -479,8 +492,7 @@ diff --git a/cromite_flags/chrome/browser/browser_features_cc/Disable-all-predic
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/browser_features_cc/Disable-all-predictors-code.inc
|
||||
@@ -0,0 +1,4 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kOmniboxTriggerForPrerender2);
|
||||
@@ -0,0 +1,3 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kBookmarkTriggerForPrerender2);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kNewTabPageTriggerForPrerender2);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kSupportSearchSuggestionForPrerender2);
|
||||
|
||||
@@ -31,17 +31,13 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../public/browser/content_browser_client.cc | 7 +-
|
||||
.../public/browser/navigation_controller.cc | 1 -
|
||||
.../Disable-conversion-measurement-api.inc | 1 +
|
||||
.../Disable-conversion-measurement-api.inc | 1 +
|
||||
.../Disable-conversion-measurement-api.inc | 1 +
|
||||
.../Disable-conversion-measurement-api.inc | 9 +
|
||||
.../Disable-conversion-measurement-api.inc | 8 +
|
||||
.../attribution/request_headers_internal.cc | 1 +
|
||||
.../network/public/cpp/attribution_utils.cc | 2 +
|
||||
third_party/blink/renderer/core/page/page.cc | 2 +-
|
||||
.../platform/runtime_enabled_features.json5 | 4 +-
|
||||
.../platform/runtime_enabled_features.json5 | 10 +-
|
||||
ui/events/android/motion_event_android.cc | 6 +-
|
||||
28 files changed, 74 insertions(+), 378 deletions(-)
|
||||
create mode 100644 cromite_flags/content/common/features_cc/Disable-conversion-measurement-api.inc
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc
|
||||
26 files changed, 74 insertions(+), 381 deletions(-)
|
||||
create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc
|
||||
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc
|
||||
|
||||
@@ -252,8 +248,8 @@ diff --git a/content/browser/attribution_reporting/attribution_report_network_se
|
||||
scoped_refptr<net::HttpResponseHeaders> headers) {
|
||||
+ if ((true)) {
|
||||
+ std::move(sent_callback)
|
||||
+ .Run(std::move(report),
|
||||
+ SendResult(SendResult::Status::kSent, headers ? headers->response_code() : 200));
|
||||
+ .Run(report,
|
||||
+ SendResult::Sent(SendResult::Sent::Result::kSent, 200));
|
||||
+ return;
|
||||
+ }
|
||||
network::SimpleURLLoader* loader = it->get();
|
||||
@@ -824,18 +820,6 @@ diff --git a/content/public/browser/navigation_controller.cc b/content/public/br
|
||||
is_pdf(input.is_pdf),
|
||||
has_rel_opener(input.has_rel_opener) {
|
||||
#if DCHECK_IS_ON()
|
||||
diff --git a/cromite_flags/content/common/features_cc/Disable-conversion-measurement-api.inc b/cromite_flags/content/common/features_cc/Disable-conversion-measurement-api.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/content/common/features_cc/Disable-conversion-measurement-api.inc
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kAttributionReportingCrossAppWebOverride);
|
||||
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc b/cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/content/public/common/content_features_cc/Disable-conversion-measurement-api.inc
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIsOverride);
|
||||
diff --git a/cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc b/cromite_flags/services/network/public/cpp/features_cc/Disable-conversion-measurement-api.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
@@ -846,7 +830,7 @@ diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-conversi
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/third_party/blink/common/features_cc/Disable-conversion-measurement-api.inc
|
||||
@@ -0,0 +1,9 @@
|
||||
@@ -0,0 +1,8 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kAdAuctionReportingWithMacroApi);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kAdAuctionSignals);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kBrowsingTopics);
|
||||
@@ -854,7 +838,6 @@ new file mode 100644
|
||||
+SET_CROMITE_FEATURE_DISABLED(kBrowsingTopicsParameters);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kFledgeBiddingAndAuctionServer);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kInterestGroupStorage);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIs);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kPrivateAggregationApi);
|
||||
diff --git a/services/network/attribution/request_headers_internal.cc b/services/network/attribution/request_headers_internal.cc
|
||||
--- a/services/network/attribution/request_headers_internal.cc
|
||||
@@ -901,6 +884,33 @@ diff --git a/third_party/blink/renderer/core/page/page.cc b/third_party/blink/re
|
||||
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -279,7 +279,7 @@
|
||||
{
|
||||
// Interest Group JS API/runtimeflag.
|
||||
name: "AdInterestGroupAPI",
|
||||
- status: "stable",
|
||||
+ status: "experimental",
|
||||
origin_trial_feature_name: "AdInterestGroupAPI",
|
||||
implied_by: ["Fledge", "Parakeet"],
|
||||
public: true,
|
||||
@@ -368,15 +368,15 @@
|
||||
},
|
||||
{
|
||||
name: "AttributionReporting",
|
||||
- status: "stable",
|
||||
+ status: "experimental",
|
||||
base_feature: "none",
|
||||
public: true,
|
||||
},
|
||||
{
|
||||
name: "AttributionReportingCrossAppWeb",
|
||||
+ status: "experimental",
|
||||
base_feature: "none",
|
||||
public: true,
|
||||
- status: "stable",
|
||||
},
|
||||
{
|
||||
// This only exists so we can use RuntimeEnabled in the IDL file
|
||||
@@ -4097,15 +4097,15 @@
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,10 +6,10 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
chrome/browser/BUILD.gn | 9 +++++++++
|
||||
chrome/browser/feed/android/web_feed_bridge.cc | 18 ++++++++++++++++++
|
||||
chrome/browser/prefs/browser_prefs.cc | 4 ++--
|
||||
chrome/browser/prefs/browser_prefs.cc | 10 +++++-----
|
||||
.../feed/core/shared_prefs/pref_names.cc | 2 +-
|
||||
components/feed/feed_feature_list.cc | 3 +++
|
||||
5 files changed, 33 insertions(+), 3 deletions(-)
|
||||
5 files changed, 36 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
@@ -109,6 +109,20 @@ diff --git a/chrome/browser/feed/android/web_feed_bridge.cc b/chrome/browser/fee
|
||||
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -251,11 +251,11 @@
|
||||
#endif
|
||||
|
||||
#include "components/feed/buildflags.h"
|
||||
-#if BUILDFLAG(ENABLE_FEED_V2)
|
||||
+//#if BUILDFLAG(ENABLE_FEED_V2)
|
||||
#include "components/feed/core/common/pref_names.h" // nogncheck
|
||||
#include "components/feed/core/shared_prefs/pref_names.h" // nogncheck
|
||||
#include "components/feed/core/v2/ios_shared_prefs.h" // nogncheck
|
||||
-#endif
|
||||
+//#endif
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
#include "chrome/browser/accessibility/accessibility_prefs/android/accessibility_prefs_controller.h"
|
||||
@@ -1898,10 +1898,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
|
||||
ChromeRLZTrackerDelegate::RegisterProfilePrefs(registry);
|
||||
#endif
|
||||
@@ -122,6 +136,15 @@ diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browse
|
||||
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
cdm::MediaDrmStorageImpl::RegisterProfilePrefs(registry);
|
||||
@@ -2688,7 +2688,7 @@ void MigrateObsoleteProfilePrefs(PrefService* profile_prefs,
|
||||
syncer::SyncPrefs::MaybeMigrateAutofillToPerAccountPref(profile_prefs);
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
+#if BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_FEED_V2)
|
||||
// Added 06/2024
|
||||
feed::prefs::MigrateObsoleteFeedExperimentPref_Jun_2024(profile_prefs);
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
diff --git a/components/feed/core/shared_prefs/pref_names.cc b/components/feed/core/shared_prefs/pref_names.cc
|
||||
--- a/components/feed/core/shared_prefs/pref_names.cc
|
||||
+++ b/components/feed/core/shared_prefs/pref_names.cc
|
||||
|
||||
@@ -9,13 +9,15 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../password_store_android_backend_bridge_helper_impl.cc | 1 +
|
||||
.../android/password_store_android_local_backend.cc | 2 +-
|
||||
.../generated_password_leak_detection_pref.cc | 3 +--
|
||||
.../password_receiver_service_factory.cc | 2 +-
|
||||
.../password_manager/password_sender_service_factory.cc | 2 +-
|
||||
.../affiliations/core/browser/affiliation_backend.cc | 1 +
|
||||
.../core/browser/affiliation_service_impl.cc | 4 ++++
|
||||
components/affiliations/core/browser/facet_manager.cc | 4 ++++
|
||||
.../leak_detection/leak_detection_check_factory_impl.cc | 5 +++++
|
||||
.../browser/leak_detection/leak_detection_check_impl.cc | 3 +--
|
||||
.../Disable-privacy-issues-in-password-manager.inc | 3 +++
|
||||
10 files changed, 21 insertions(+), 14 deletions(-)
|
||||
.../Disable-privacy-issues-in-password-manager.inc | 1 +
|
||||
12 files changed, 21 insertions(+), 16 deletions(-)
|
||||
create mode 100644 cromite_flags/components/password_manager/core/browser/features/password_features_cc/Disable-privacy-issues-in-password-manager.inc
|
||||
|
||||
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
|
||||
@@ -73,6 +75,30 @@ diff --git a/chrome/browser/password_manager/generated_password_leak_detection_p
|
||||
}
|
||||
|
||||
// Returns whether the effective value of the Safe Browsing preferences for
|
||||
diff --git a/chrome/browser/password_manager/password_receiver_service_factory.cc b/chrome/browser/password_manager/password_receiver_service_factory.cc
|
||||
--- a/chrome/browser/password_manager/password_receiver_service_factory.cc
|
||||
+++ b/chrome/browser/password_manager/password_receiver_service_factory.cc
|
||||
@@ -55,7 +55,7 @@ PasswordReceiverServiceFactory::BuildServiceInstanceForBrowserContext(
|
||||
content::BrowserContext* context) const {
|
||||
// Password receiving on Android is handled in GMSCore, and hence no service
|
||||
// should be instantiated.
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
+#if true
|
||||
return nullptr;
|
||||
#else
|
||||
|
||||
diff --git a/chrome/browser/password_manager/password_sender_service_factory.cc b/chrome/browser/password_manager/password_sender_service_factory.cc
|
||||
--- a/chrome/browser/password_manager/password_sender_service_factory.cc
|
||||
+++ b/chrome/browser/password_manager/password_sender_service_factory.cc
|
||||
@@ -50,7 +50,7 @@ PasswordSenderServiceFactory::BuildServiceInstanceForBrowserContext(
|
||||
content::BrowserContext* context) const {
|
||||
// Password sending on Android is handled in GMSCore, and hence no service
|
||||
// should be instantiated.
|
||||
-#if BUILDFLAG(IS_ANDROID)
|
||||
+#if true
|
||||
return nullptr;
|
||||
#else
|
||||
|
||||
diff --git a/components/affiliations/core/browser/affiliation_backend.cc b/components/affiliations/core/browser/affiliation_backend.cc
|
||||
--- a/components/affiliations/core/browser/affiliation_backend.cc
|
||||
+++ b/components/affiliations/core/browser/affiliation_backend.cc
|
||||
@@ -144,8 +170,6 @@ diff --git a/cromite_flags/components/password_manager/core/browser/features/pas
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/components/password_manager/core/browser/features/password_features_cc/Disable-privacy-issues-in-password-manager.inc
|
||||
@@ -0,0 +1,3 @@
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_ENABLED(kFillOnAccountSelect);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableReceiverService);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kPasswordManagerEnableSenderService);
|
||||
--
|
||||
|
||||
@@ -25,10 +25,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../tracking_protection_prefs.cc | 4 ++--
|
||||
.../identity_manager/account_capabilities.cc | 2 +-
|
||||
.../features_cc/Disable-privacy-sandbox.inc | 1 +
|
||||
.../Disable-privacy-sandbox.inc | 1 +
|
||||
.../features_cc/Disable-privacy-sandbox.inc | 4 ++++
|
||||
third_party/blink/common/features.cc | 1 +
|
||||
17 files changed, 40 insertions(+), 28 deletions(-)
|
||||
18 files changed, 41 insertions(+), 28 deletions(-)
|
||||
create mode 100644 cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_cc/Disable-privacy-sandbox.inc
|
||||
create mode 100644 cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc
|
||||
|
||||
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -305,6 +307,12 @@ new file mode 100644
|
||||
+++ b/cromite_flags/content/common/features_cc/Disable-privacy-sandbox.inc
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIsM1Override);
|
||||
diff --git a/cromite_flags/content/public/common/content_features_cc/Disable-privacy-sandbox.inc b/cromite_flags/content/public/common/content_features_cc/Disable-privacy-sandbox.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/content/public/common/content_features_cc/Disable-privacy-sandbox.inc
|
||||
@@ -0,0 +1 @@
|
||||
+SET_CROMITE_FEATURE_DISABLED(kPrivacySandboxAdsAPIsOverride);
|
||||
diff --git a/cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc b/cromite_flags/third_party/blink/common/features_cc/Disable-privacy-sandbox.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
|
||||
@@ -43,7 +43,7 @@ diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer
|
||||
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
--- a/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
+++ b/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
@@ -484,6 +484,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const {
|
||||
@@ -483,6 +483,14 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
bool ContentSettingsAgentImpl::UpdateOverrides() {
|
||||
// Evaluate the content setting rules
|
||||
ContentSetting setting = CONTENT_SETTING_ALLOW;
|
||||
@@ -494,7 +502,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() {
|
||||
@@ -493,7 +501,6 @@ bool ContentSettingsAgentImpl::UpdateOverrides() {
|
||||
}
|
||||
return UpdateTimeZoneOverride(
|
||||
setting, content_setting_rules_->timezone_override_value);
|
||||
|
||||
@@ -122,7 +122,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tracing/setting
|
||||
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
|
||||
--- a/chrome/app/chrome_main_delegate.cc
|
||||
+++ b/chrome/app/chrome_main_delegate.cc
|
||||
@@ -2017,7 +2017,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
@@ -2016,7 +2016,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
|
||||
const std::string process_type =
|
||||
command_line->GetSwitchValueASCII(switches::kProcessType);
|
||||
const bool is_browser_process = process_type.empty();
|
||||
|
||||
@@ -354,7 +354,7 @@ diff --git a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browse
|
||||
*/
|
||||
- @CalledByNative
|
||||
public static int getAndroidAutofillFrameworkAvailability(PrefService prefs) {
|
||||
+ if ((true)) return true;
|
||||
+ if ((true)) return AndroidAutofillAvailabilityStatus.AVAILABLE;
|
||||
if (sAndroidAutofillFrameworkAvailabilityForTesting != null) {
|
||||
return sAndroidAutofillFrameworkAvailabilityForTesting;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ PartitionNelAndReportingByNetworkIsolationKey
|
||||
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../base/features_cc/Enable-network-isolation-features.inc | 6 ++++++
|
||||
.../cpp/features_cc/Enable-network-isolation-features.inc | 1 +
|
||||
2 files changed, 7 insertions(+)
|
||||
.../net/base/features_cc/Enable-network-isolation-features.inc | 3 +++
|
||||
.../cpp/features_cc/Enable-network-isolation-features.inc | 1 +
|
||||
2 files changed, 4 insertions(+)
|
||||
create mode 100644 cromite_flags/net/base/features_cc/Enable-network-isolation-features.inc
|
||||
create mode 100644 cromite_flags/services/network/public/cpp/features_cc/Enable-network-isolation-features.inc
|
||||
|
||||
@@ -19,13 +19,10 @@ diff --git a/cromite_flags/net/base/features_cc/Enable-network-isolation-feature
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/net/base/features_cc/Enable-network-isolation-features.inc
|
||||
@@ -0,0 +1,6 @@
|
||||
@@ -0,0 +1,3 @@
|
||||
+SET_CROMITE_FEATURE_ENABLED(kSplitCacheByNetworkIsolationKey);
|
||||
+SET_CROMITE_FEATURE_ENABLED(kSplitCodeCacheByNetworkIsolationKey);
|
||||
+SET_CROMITE_FEATURE_ENABLED(kPartitionConnectionsByNetworkIsolationKey);
|
||||
+
|
||||
+SET_CROMITE_FEATURE_DISABLED(kEnableCrossSiteFlagNetworkIsolationKey);
|
||||
+SET_CROMITE_FEATURE_DISABLED(kEnableFrameSiteSharedOpaqueNetworkIsolationKey);
|
||||
diff --git a/cromite_flags/services/network/public/cpp/features_cc/Enable-network-isolation-features.inc b/cromite_flags/services/network/public/cpp/features_cc/Enable-network-isolation-features.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
|
||||
@@ -44,8 +44,8 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
.../settings_localized_strings_provider.cc | 8 +
|
||||
...ings_localized_strings_provider_android.cc | 198 +++++++++++++
|
||||
...tings_localized_strings_provider_android.h | 19 ++
|
||||
.../ui/webui/settings/settings_ui_android.cc | 134 +++++++++
|
||||
.../ui/webui/settings/settings_ui_android.h | 119 ++++++++
|
||||
.../ui/webui/settings/settings_ui_android.cc | 126 +++++++++
|
||||
.../ui/webui/settings/settings_ui_android.h | 103 +++++++
|
||||
chrome/chrome_paks.gni | 11 +
|
||||
.../browser_ui/settings/SettingsLauncher.java | 2 +
|
||||
.../search_engine_desktop_ui.grdp | 6 +
|
||||
@@ -56,8 +56,9 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
content/browser/webui/web_ui_impl.cc | 14 +-
|
||||
content/browser/webui/web_ui_impl.h | 3 +
|
||||
content/public/browser/web_ui.h | 1 +
|
||||
third_party/polymer/v3_0/BUILD.gn | 6 +
|
||||
ui/base/template_expressions.cc | 21 +-
|
||||
ui/webui/BUILD.gn | 8 +
|
||||
ui/webui/BUILD.gn | 7 +
|
||||
ui/webui/resources/BUILD.gn | 10 +
|
||||
.../customize_color_scheme_mode/BUILD.gn | 2 +-
|
||||
.../cr_components/help_bubble/BUILD.gn | 2 +-
|
||||
@@ -69,7 +70,7 @@ License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
ui/webui/resources/include_polymer.gni | 2 +-
|
||||
ui/webui/resources/js/BUILD.gn | 2 +-
|
||||
ui/webui/resources/js/load_time_data.ts | 17 +-
|
||||
62 files changed, 1105 insertions(+), 61 deletions(-)
|
||||
63 files changed, 1086 insertions(+), 61 deletions(-)
|
||||
create mode 100644 chrome/app/settings_strings_android.grdp
|
||||
create mode 100644 chrome/browser/search_engines/android/java/res/layout/search_engine_layout.xml
|
||||
create mode 100644 chrome/browser/ui/webui/settings/settings_localized_strings_provider_android.cc
|
||||
@@ -1574,7 +1575,7 @@ diff --git a/chrome/browser/ui/webui/settings/settings_ui_android.cc b/chrome/br
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_ui_android.cc
|
||||
@@ -0,0 +1,134 @@
|
||||
@@ -0,0 +1,126 @@
|
||||
+// Copyright 2015 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
@@ -1620,7 +1621,6 @@ new file mode 100644
|
||||
+#include "chrome/browser/ui/webui/webui_util.h"
|
||||
+#include "chrome/browser/ui/webui/theme_handler.h"
|
||||
+#include "chrome/browser/ui/webui/cr_components/customize_color_scheme_mode/customize_color_scheme_mode_handler.h"
|
||||
+#include "chrome/browser/ui/webui/customize_themes/chrome_customize_themes_handler.h"
|
||||
+#include "chrome/browser/ui/webui/settings/settings_localized_strings_provider_android.h"
|
||||
+
|
||||
+#if !BUILDFLAG(OPTIMIZE_WEBUI)
|
||||
@@ -1678,13 +1678,6 @@ new file mode 100644
|
||||
+ web_ui()->AddMessageHandler(std::move(handler));
|
||||
+}
|
||||
+
|
||||
+void SettingsUI::CreateCustomizeThemesHandler(
|
||||
+ mojo::PendingRemote<customize_themes::mojom::CustomizeThemesClient>
|
||||
+ pending_client,
|
||||
+ mojo::PendingReceiver<customize_themes::mojom::CustomizeThemesHandler>
|
||||
+ pending_handler) {
|
||||
+}
|
||||
+
|
||||
+void SettingsUI::CreateThemeColorPickerHandler(
|
||||
+ mojo::PendingReceiver<theme_color_picker::mojom::ThemeColorPickerHandler>
|
||||
+ handler,
|
||||
@@ -1713,7 +1706,7 @@ diff --git a/chrome/browser/ui/webui/settings/settings_ui_android.h b/chrome/bro
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/ui/webui/settings/settings_ui_android.h
|
||||
@@ -0,0 +1,119 @@
|
||||
@@ -0,0 +1,103 @@
|
||||
+#ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_UI_ANDROID_H_
|
||||
+#define CHROME_BROWSER_UI_WEBUI_SETTINGS_SETTINGS_UI_ANDROID_H_
|
||||
+
|
||||
@@ -1730,7 +1723,6 @@ new file mode 100644
|
||||
+#include "ui/webui/resources/cr_components/help_bubble/help_bubble.mojom.h"
|
||||
+
|
||||
+#if !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
+#include "ui/webui/resources/cr_components/customize_themes/customize_themes.mojom.h"
|
||||
+#include "ui/webui/resources/cr_components/theme_color_picker/theme_color_picker.mojom.h"
|
||||
+#endif // !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
+
|
||||
@@ -1759,7 +1751,6 @@ new file mode 100644
|
||||
+ // chrome://settings/manageProfile which only exists on !OS_CHROMEOS
|
||||
+ // requires mojo bindings.
|
||||
+ ,
|
||||
+ public customize_themes::mojom::CustomizeThemesHandlerFactory,
|
||||
+ public theme_color_picker::mojom::ThemeColorPickerHandlerFactory
|
||||
+#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
+{
|
||||
@@ -1775,13 +1766,6 @@ new file mode 100644
|
||||
+
|
||||
+#if !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
+ // Instantiates the implementor of the
|
||||
+ // customize_themes::mojom::CustomizeThemesHandlerFactory mojo interface
|
||||
+ // passing the pending receiver that will be internally bound.
|
||||
+ void BindInterface(mojo::PendingReceiver<
|
||||
+ customize_themes::mojom::CustomizeThemesHandlerFactory>
|
||||
+ pending_receiver);
|
||||
+
|
||||
+ // Instantiates the implementor of the
|
||||
+ // theme_color_picker::mojom::ThemeColorPickerHandlerFactory mojo interface
|
||||
+ // passing the pending receiver that will be internally bound.
|
||||
+ void BindInterface(mojo::PendingReceiver<
|
||||
@@ -1805,13 +1789,6 @@ new file mode 100644
|
||||
+ std::unique_ptr<content::WebUIMessageHandler> handler);
|
||||
+
|
||||
+#if !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
+ // customize_themes::mojom::CustomizeThemesHandlerFactory:
|
||||
+ void CreateCustomizeThemesHandler(
|
||||
+ mojo::PendingRemote<customize_themes::mojom::CustomizeThemesClient>
|
||||
+ pending_client,
|
||||
+ mojo::PendingReceiver<customize_themes::mojom::CustomizeThemesHandler>
|
||||
+ pending_handler) override;
|
||||
+
|
||||
+ // theme_color_picker::mojom::ThemeColorPickerHandlerFactory:
|
||||
+ void CreateThemeColorPickerHandler(
|
||||
+ mojo::PendingReceiver<theme_color_picker::mojom::ThemeColorPickerHandler>
|
||||
@@ -2023,6 +2000,22 @@ diff --git a/content/public/browser/web_ui.h b/content/public/browser/web_ui.h
|
||||
|
||||
// Used by WebUIMessageHandlers. If the given message is already registered,
|
||||
// the call has no effect.
|
||||
diff --git a/third_party/polymer/v3_0/BUILD.gn b/third_party/polymer/v3_0/BUILD.gn
|
||||
--- a/third_party/polymer/v3_0/BUILD.gn
|
||||
+++ b/third_party/polymer/v3_0/BUILD.gn
|
||||
@@ -36,6 +36,12 @@ js_files = [
|
||||
"paper-spinner/paper-spinner-styles.js",
|
||||
]
|
||||
|
||||
+if (is_android) {
|
||||
+ js_files += [
|
||||
+ "iron-collapse/iron-collapse.js",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
# Also needed on LaCros for Print Preview. Remove once CrOS Print Preview
|
||||
# launches.
|
||||
if (is_chromeos) {
|
||||
diff --git a/ui/base/template_expressions.cc b/ui/base/template_expressions.cc
|
||||
--- a/ui/base/template_expressions.cc
|
||||
+++ b/ui/base/template_expressions.cc
|
||||
@@ -2066,14 +2059,13 @@ diff --git a/ui/base/template_expressions.cc b/ui/base/template_expressions.cc
|
||||
diff --git a/ui/webui/BUILD.gn b/ui/webui/BUILD.gn
|
||||
--- a/ui/webui/BUILD.gn
|
||||
+++ b/ui/webui/BUILD.gn
|
||||
@@ -28,6 +28,14 @@ static_library("webui") {
|
||||
@@ -28,6 +28,13 @@ static_library("webui") {
|
||||
"//ui/webui/resources/js/metrics_reporter:mojo_bindings",
|
||||
]
|
||||
|
||||
+ if (is_android) {
|
||||
+ public_deps += [
|
||||
+ "//ui/webui/resources/cr_components/customize_color_scheme_mode:mojom",
|
||||
+ "//ui/webui/resources/cr_components/customize_themes:mojom",
|
||||
+ "//ui/webui/resources/cr_components/theme_color_picker:mojom",
|
||||
+ ]
|
||||
+ }
|
||||
|
||||
@@ -74,7 +74,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../user-script-ui/user-scripts-ui.js | 9 +
|
||||
.../browser/ui/user_scripts_ui.cc | 146 ++++
|
||||
.../user_scripts/browser/ui/user_scripts_ui.h | 37 +
|
||||
.../browser/user_script_loader.cc | 716 ++++++++++++++++
|
||||
.../browser/user_script_loader.cc | 708 +++++++++++++++
|
||||
.../user_scripts/browser/user_script_loader.h | 168 ++++
|
||||
.../browser/user_script_pref_info.cc | 34 +
|
||||
.../browser/user_script_pref_info.h | 72 ++
|
||||
@@ -135,7 +135,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../Experimental-user-scripts-support.inc | 13 +
|
||||
ipc/ipc_message_start.h | 1 +
|
||||
tools/gritsettings/resource_ids.spec | 6 +
|
||||
108 files changed, 9492 insertions(+), 2 deletions(-)
|
||||
108 files changed, 9484 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
|
||||
@@ -2758,7 +2758,7 @@ new file mode 100644
|
||||
+ base::Value::Dict scriptData;
|
||||
+ for (const std::unique_ptr<user_scripts::UserScript::File>& js_file :
|
||||
+ script->js_scripts()) {
|
||||
+ base::StringPiece contents = js_file->GetContent();
|
||||
+ std::string_view contents = js_file->GetContent();
|
||||
+ scriptData.Set("content", contents.data());
|
||||
+ }
|
||||
+ response.Append(std::move(scriptData));
|
||||
@@ -2831,7 +2831,7 @@ diff --git a/components/user_scripts/browser/user_script_loader.cc b/components/
|
||||
new file mode 100755
|
||||
--- /dev/null
|
||||
+++ b/components/user_scripts/browser/user_script_loader.cc
|
||||
@@ -0,0 +1,716 @@
|
||||
@@ -0,0 +1,708 @@
|
||||
+/*
|
||||
+ This file is part of Bromite.
|
||||
+
|
||||
@@ -2903,33 +2903,33 @@ new file mode 100755
|
||||
+
|
||||
+namespace {
|
||||
+
|
||||
+static const base::StringPiece kUserScriptBegin("// ==UserScript==");
|
||||
+static const base::StringPiece kUserScriptEnd("// ==/UserScript==");
|
||||
+static const base::StringPiece kNamespaceDeclaration("// @namespace");
|
||||
+static const base::StringPiece kNameDeclaration("// @name");
|
||||
+static const base::StringPiece kVersionDeclaration("// @version");
|
||||
+static const base::StringPiece kDescriptionDeclaration("// @description");
|
||||
+static const base::StringPiece kIncludeDeclaration("// @include");
|
||||
+static const base::StringPiece kExcludeDeclaration("// @exclude");
|
||||
+static const base::StringPiece kMatchDeclaration("// @match");
|
||||
+static const base::StringPiece kExcludeMatchDeclaration("// @exclude_match");
|
||||
+static const base::StringPiece kRunAtDeclaration("// @run-at");
|
||||
+static const base::StringPiece kRunAtDocumentStartValue("document-start");
|
||||
+static const base::StringPiece kRunAtDocumentEndValue("document-end");
|
||||
+static const base::StringPiece kRunAtDocumentIdleValue("document-idle");
|
||||
+static const base::StringPiece kUrlSourceDeclaration("// @url");
|
||||
+static const base::StringPiece kUrlHomePageDeclaration("// @homepage");
|
||||
+static const std::string_view kUserScriptBegin("// ==UserScript==");
|
||||
+static const std::string_view kUserScriptEnd("// ==/UserScript==");
|
||||
+static const std::string_view kNamespaceDeclaration("// @namespace");
|
||||
+static const std::string_view kNameDeclaration("// @name");
|
||||
+static const std::string_view kVersionDeclaration("// @version");
|
||||
+static const std::string_view kDescriptionDeclaration("// @description");
|
||||
+static const std::string_view kIncludeDeclaration("// @include");
|
||||
+static const std::string_view kExcludeDeclaration("// @exclude");
|
||||
+static const std::string_view kMatchDeclaration("// @match");
|
||||
+static const std::string_view kExcludeMatchDeclaration("// @exclude_match");
|
||||
+static const std::string_view kRunAtDeclaration("// @run-at");
|
||||
+static const std::string_view kRunAtDocumentStartValue("document-start");
|
||||
+static const std::string_view kRunAtDocumentEndValue("document-end");
|
||||
+static const std::string_view kRunAtDocumentIdleValue("document-idle");
|
||||
+static const std::string_view kUrlSourceDeclaration("// @url");
|
||||
+static const std::string_view kUrlHomePageDeclaration("// @homepage");
|
||||
+
|
||||
+// internal use
|
||||
+static const base::StringPiece kParserError("// @error");
|
||||
+static const base::StringPiece kForceDisabled("// @disabled");
|
||||
+static const std::string_view kParserError("// @error");
|
||||
+static const std::string_view kForceDisabled("// @disabled");
|
||||
+
|
||||
+// Helper function to parse greasesmonkey headers
|
||||
+bool GetDeclarationValue(const base::StringPiece& line,
|
||||
+ const base::StringPiece& prefix,
|
||||
+bool GetDeclarationValue(const std::string_view& line,
|
||||
+ const std::string_view& prefix,
|
||||
+ std::string* value) {
|
||||
+ base::StringPiece::size_type index = line.find(prefix);
|
||||
+ if (index == base::StringPiece::npos)
|
||||
+ std::string_view::size_type index = line.find(prefix);
|
||||
+ if (index == std::string_view::npos)
|
||||
+ return false;
|
||||
+
|
||||
+ std::string temp(line.data() + index + prefix.length(),
|
||||
@@ -2945,12 +2945,12 @@ new file mode 100755
|
||||
+} // namespace
|
||||
+
|
||||
+// static
|
||||
+bool UserScriptLoader::ParseMetadataHeader(const base::StringPiece& script_text,
|
||||
+bool UserScriptLoader::ParseMetadataHeader(const std::string_view& script_text,
|
||||
+ std::unique_ptr<UserScript>& script,
|
||||
+ bool *found_metadata,
|
||||
+ std::string& error_message) {
|
||||
+ // http://wiki.greasespot.net/Metadata_block
|
||||
+ base::StringPiece line;
|
||||
+ std::string_view line;
|
||||
+ size_t line_start = 0;
|
||||
+ size_t line_end = line_start;
|
||||
+ *found_metadata = false;
|
||||
@@ -2962,7 +2962,7 @@ new file mode 100755
|
||||
+ if (line_end == std::string::npos)
|
||||
+ line_end = script_text.length() - 1;
|
||||
+
|
||||
+ line = base::StringPiece(script_text.data() + line_start,
|
||||
+ line = std::string_view(script_text.data() + line_start,
|
||||
+ line_end - line_start);
|
||||
+
|
||||
+ if (!*found_metadata) {
|
||||
@@ -3101,7 +3101,7 @@ new file mode 100755
|
||||
+ // create SHA256 of file
|
||||
+ char raw[crypto::kSHA256Length] = {0};
|
||||
+ crypto::SHA256HashString(content, raw, crypto::kSHA256Length);
|
||||
+ std::string key = base::Base64Encode(base::StringPiece(raw, crypto::kSHA256Length));
|
||||
+ std::string key = base::Base64Encode(std::string_view(raw, crypto::kSHA256Length));
|
||||
+ file->set_key(key);
|
||||
+
|
||||
+ file->set_url(GURL(base::StrCat({"https://userscripts/file/", key, ".js"})));
|
||||
@@ -3238,12 +3238,12 @@ new file mode 100755
|
||||
+ // allocating a new string.
|
||||
+ for (const std::unique_ptr<UserScript::File>& js_file :
|
||||
+ script->js_scripts()) {
|
||||
+ base::StringPiece contents = js_file->GetContent();
|
||||
+ std::string_view contents = js_file->GetContent();
|
||||
+ pickle.WriteData(contents.data(), contents.length());
|
||||
+ }
|
||||
+ for (const std::unique_ptr<UserScript::File>& css_file :
|
||||
+ script->css_scripts()) {
|
||||
+ base::StringPiece contents = css_file->GetContent();
|
||||
+ std::string_view contents = css_file->GetContent();
|
||||
+ pickle.WriteData(contents.data(), contents.length());
|
||||
+ }
|
||||
+ }
|
||||
@@ -3411,17 +3411,11 @@ new file mode 100755
|
||||
+ ui::SelectFileDialog::FileTypeInfo::ANY_PATH;
|
||||
+ base::FilePath suggested_name;
|
||||
+
|
||||
+ std::vector<std::u16string> types;
|
||||
+ types.push_back(u"*/*"); /*= java SelectFileDialog.ALL_TYPES*/
|
||||
+ std::pair<std::vector<std::u16string>, bool> accept_types = std::make_pair(
|
||||
+ types, false /*use_media_capture*/);
|
||||
+
|
||||
+ dialog_->SelectFile(
|
||||
+ ui::SelectFileDialog::SELECT_OPEN_FILE,
|
||||
+ std::u16string() /* dialog title*/, suggested_name, &allowed_file_info,
|
||||
+ 0 /* file type index */, std::string() /* default file extension */,
|
||||
+ nativeWindow,
|
||||
+ &accept_types /* params */);
|
||||
+ 0 /* file type index */, base::FilePath::StringType() /* default file extension */,
|
||||
+ nativeWindow);
|
||||
+}
|
||||
+
|
||||
+
|
||||
@@ -3528,7 +3522,7 @@ new file mode 100755
|
||||
+}
|
||||
+
|
||||
+void UserScriptLoader::FileSelected(
|
||||
+ const ui::SelectedFileInfo& file, int index, void* params) {
|
||||
+ const ui::SelectedFileInfo& file, int index) {
|
||||
+ if (base::FeatureList::IsEnabled(features::kEnableLoggingUserScripts))
|
||||
+ LOG(INFO) << "UserScriptLoader: FileSelected " << file.path();
|
||||
+
|
||||
@@ -3543,9 +3537,7 @@ new file mode 100755
|
||||
+ StartLoad();
|
||||
+}
|
||||
+
|
||||
+void UserScriptLoader::FileSelectionCanceled(
|
||||
+ void* params) {
|
||||
+}
|
||||
+void UserScriptLoader::FileSelectionCanceled() {}
|
||||
+
|
||||
+} // namespace extensions
|
||||
diff --git a/components/user_scripts/browser/user_script_loader.h b/components/user_scripts/browser/user_script_loader.h
|
||||
@@ -3627,7 +3619,7 @@ new file mode 100755
|
||||
+ };
|
||||
+
|
||||
+ // Parses the includes out of |script| and returns them in |includes|.
|
||||
+ static bool ParseMetadataHeader(const base::StringPiece& script_text,
|
||||
+ static bool ParseMetadataHeader(const std::string_view& script_text,
|
||||
+ std::unique_ptr<UserScript>& script,
|
||||
+ bool *found_metadata,
|
||||
+ std::string& error_message);
|
||||
@@ -3710,8 +3702,8 @@ new file mode 100755
|
||||
+ // Manage file dialog requests
|
||||
+ scoped_refptr<ui::SelectFileDialog> dialog_;
|
||||
+ void FileSelected(const ui::SelectedFileInfo& file,
|
||||
+ int index, void* params) override;
|
||||
+ void FileSelectionCanceled(void* params) override;
|
||||
+ int index) override;
|
||||
+ void FileSelectionCanceled() override;
|
||||
+ void LoadScriptFromPathOnFileTaskRunnerCallback(
|
||||
+ bool result, const std::string& error );
|
||||
+
|
||||
@@ -4430,13 +4422,13 @@ new file mode 100755
|
||||
+namespace {
|
||||
+
|
||||
+std::string FormatErrorMessageInternal(
|
||||
+ base::StringPiece format,
|
||||
+ std::initializer_list<base::StringPiece> args) {
|
||||
+ std::string_view format,
|
||||
+ std::initializer_list<std::string_view> args) {
|
||||
+ std::string format_str = format.as_string();
|
||||
+ base::StringTokenizer tokenizer(format_str, "*");
|
||||
+ tokenizer.set_options(base::StringTokenizer::RETURN_DELIMS);
|
||||
+
|
||||
+ std::vector<base::StringPiece> result_pieces;
|
||||
+ std::vector<std::string_view> result_pieces;
|
||||
+ auto* args_it = args.begin();
|
||||
+ while (tokenizer.GetNext()) {
|
||||
+ if (!tokenizer.token_is_delim()) {
|
||||
@@ -4460,8 +4452,8 @@ new file mode 100755
|
||||
+
|
||||
+} // namespace
|
||||
+
|
||||
+std::string ErrorUtils::FormatErrorMessage(base::StringPiece format,
|
||||
+ base::StringPiece s1) {
|
||||
+std::string ErrorUtils::FormatErrorMessage(std::string_view format,
|
||||
+ std::string_view s1) {
|
||||
+ return FormatErrorMessageInternal(format, {s1});
|
||||
+}
|
||||
+
|
||||
@@ -4487,8 +4479,8 @@ new file mode 100755
|
||||
+class ErrorUtils {
|
||||
+ public:
|
||||
+ // Creates an error messages from a pattern.
|
||||
+ static std::string FormatErrorMessage(base::StringPiece format,
|
||||
+ base::StringPiece s1);
|
||||
+ static std::string FormatErrorMessage(std::string_view format,
|
||||
+ std::string_view s1);
|
||||
+
|
||||
+};
|
||||
+
|
||||
@@ -4865,7 +4857,7 @@ new file mode 100755
|
||||
+
|
||||
+const char kPathSeparator[] = "/";
|
||||
+
|
||||
+bool IsStandardScheme(base::StringPiece scheme) {
|
||||
+bool IsStandardScheme(std::string_view scheme) {
|
||||
+ // "*" gets the same treatment as a standard scheme.
|
||||
+ if (scheme == "*")
|
||||
+ return true;
|
||||
@@ -4874,7 +4866,7 @@ new file mode 100755
|
||||
+ url::Component(0, static_cast<int>(scheme.length())));
|
||||
+}
|
||||
+
|
||||
+bool IsValidPortForScheme(base::StringPiece scheme, base::StringPiece port) {
|
||||
+bool IsValidPortForScheme(std::string_view scheme, std::string_view port) {
|
||||
+ if (port == "*")
|
||||
+ return true;
|
||||
+
|
||||
@@ -4897,14 +4889,14 @@ new file mode 100755
|
||||
+// the path will have only a single wildcard at the end. This makes figuring
|
||||
+// out overlap much easier. It seems like there is probably a computer-sciency
|
||||
+// way to solve the general case, but we don't need that yet.
|
||||
+base::StringPiece StripTrailingWildcard(base::StringPiece path) {
|
||||
+std::string_view StripTrailingWildcard(std::string_view path) {
|
||||
+ if (base::EndsWith(path, "*"))
|
||||
+ path.remove_suffix(1);
|
||||
+ return path;
|
||||
+}
|
||||
+
|
||||
+// Removes trailing dot from |host_piece| if any.
|
||||
+base::StringPiece CanonicalizeHostForMatching(base::StringPiece host_piece) {
|
||||
+std::string_view CanonicalizeHostForMatching(std::string_view host_piece) {
|
||||
+ if (base::EndsWith(host_piece, "."))
|
||||
+ host_piece.remove_suffix(1);
|
||||
+ return host_piece;
|
||||
@@ -4913,7 +4905,7 @@ new file mode 100755
|
||||
+} // namespace
|
||||
+
|
||||
+// static
|
||||
+bool URLPattern::IsValidSchemeForExtensions(base::StringPiece scheme) {
|
||||
+bool URLPattern::IsValidSchemeForExtensions(std::string_view scheme) {
|
||||
+ for (size_t i = 0; i < std::size(kValidSchemes); ++i) {
|
||||
+ if (scheme == kValidSchemes[i])
|
||||
+ return true;
|
||||
@@ -4941,7 +4933,7 @@ new file mode 100755
|
||||
+ match_subdomains_(false),
|
||||
+ port_("*") {}
|
||||
+
|
||||
+URLPattern::URLPattern(int valid_schemes, base::StringPiece pattern)
|
||||
+URLPattern::URLPattern(int valid_schemes, std::string_view pattern)
|
||||
+ // Strict error checking is used, because this constructor is only
|
||||
+ // appropriate when we know |pattern| is valid.
|
||||
+ : valid_schemes_(valid_schemes),
|
||||
@@ -4981,7 +4973,7 @@ new file mode 100755
|
||||
+ return out << '"' << url_pattern.GetAsString() << '"';
|
||||
+}
|
||||
+
|
||||
+URLPattern::ParseResult URLPattern::Parse(base::StringPiece pattern) {
|
||||
+URLPattern::ParseResult URLPattern::Parse(std::string_view pattern) {
|
||||
+ spec_.clear();
|
||||
+ SetMatchAllURLs(false);
|
||||
+ SetMatchSubdomains(false);
|
||||
@@ -4998,12 +4990,12 @@ new file mode 100755
|
||||
+ bool has_standard_scheme_separator = true;
|
||||
+
|
||||
+ // Some urls also use ':' alone as the scheme separator.
|
||||
+ if (scheme_end_pos == base::StringPiece::npos) {
|
||||
+ if (scheme_end_pos == std::string_view::npos) {
|
||||
+ scheme_end_pos = pattern.find(':');
|
||||
+ has_standard_scheme_separator = false;
|
||||
+ }
|
||||
+
|
||||
+ if (scheme_end_pos == base::StringPiece::npos)
|
||||
+ if (scheme_end_pos == std::string_view::npos)
|
||||
+ return ParseResult::kMissingSchemeSeparator;
|
||||
+
|
||||
+ if (!SetScheme(pattern.substr(0, scheme_end_pos)))
|
||||
@@ -5027,7 +5019,7 @@ new file mode 100755
|
||||
+ path_start_pos = host_start_pos;
|
||||
+ } else if (scheme_ == url::kFileScheme) {
|
||||
+ size_t host_end_pos = pattern.find(kPathSeparator, host_start_pos);
|
||||
+ if (host_end_pos == base::StringPiece::npos) {
|
||||
+ if (host_end_pos == std::string_view::npos) {
|
||||
+ // Allow hostname omission.
|
||||
+ // e.g. file://* is interpreted as file:///*,
|
||||
+ // file://foo* is interpreted as file:///foo*.
|
||||
@@ -5044,19 +5036,19 @@ new file mode 100755
|
||||
+ if (host_start_pos == host_end_pos)
|
||||
+ return ParseResult::kEmptyHost;
|
||||
+
|
||||
+ if (host_end_pos == base::StringPiece::npos)
|
||||
+ if (host_end_pos == std::string_view::npos)
|
||||
+ return ParseResult::kEmptyPath;
|
||||
+
|
||||
+ base::StringPiece host_and_port =
|
||||
+ std::string_view host_and_port =
|
||||
+ pattern.substr(host_start_pos, host_end_pos - host_start_pos);
|
||||
+
|
||||
+ size_t port_separator_pos = base::StringPiece::npos;
|
||||
+ size_t port_separator_pos = std::string_view::npos;
|
||||
+ if (host_and_port[0] != '[') {
|
||||
+ // Not IPv6 (either IPv4 or just a normal address).
|
||||
+ port_separator_pos = host_and_port.find(':');
|
||||
+ } else { // IPv6.
|
||||
+ size_t ipv6_host_end_pos = host_and_port.find(']');
|
||||
+ if (ipv6_host_end_pos == base::StringPiece::npos)
|
||||
+ if (ipv6_host_end_pos == std::string_view::npos)
|
||||
+ return ParseResult::kInvalidHost;
|
||||
+ if (ipv6_host_end_pos == 1)
|
||||
+ return ParseResult::kEmptyHost;
|
||||
@@ -5071,21 +5063,21 @@ new file mode 100755
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (port_separator_pos != base::StringPiece::npos &&
|
||||
+ if (port_separator_pos != std::string_view::npos &&
|
||||
+ !SetPort(host_and_port.substr(port_separator_pos + 1))) {
|
||||
+ return ParseResult::kInvalidPort;
|
||||
+ }
|
||||
+
|
||||
+ // Note: this substr() will be the entire string if the port position
|
||||
+ // wasn't found.
|
||||
+ base::StringPiece host_piece = host_and_port.substr(0, port_separator_pos);
|
||||
+ std::string_view host_piece = host_and_port.substr(0, port_separator_pos);
|
||||
+
|
||||
+ if (host_piece.empty())
|
||||
+ return ParseResult::kEmptyHost;
|
||||
+
|
||||
+ if (host_piece == "*") {
|
||||
+ match_subdomains_ = true;
|
||||
+ host_piece = base::StringPiece();
|
||||
+ host_piece = std::string_view();
|
||||
+ } else if (base::StartsWith(host_piece, "*.")) {
|
||||
+ if (host_piece.length() == 2) {
|
||||
+ // We don't allow just '*.' as a host.
|
||||
@@ -5134,7 +5126,7 @@ new file mode 100755
|
||||
+ valid_schemes_ = valid_schemes;
|
||||
+}
|
||||
+
|
||||
+void URLPattern::SetHost(base::StringPiece host) {
|
||||
+void URLPattern::SetHost(std::string_view host) {
|
||||
+ spec_.clear();
|
||||
+ host_.assign(host.data(), host.size());
|
||||
+}
|
||||
@@ -5156,7 +5148,7 @@ new file mode 100755
|
||||
+ match_subdomains_ = val;
|
||||
+}
|
||||
+
|
||||
+bool URLPattern::SetScheme(base::StringPiece scheme) {
|
||||
+bool URLPattern::SetScheme(std::string_view scheme) {
|
||||
+ spec_.clear();
|
||||
+ scheme_.assign(scheme.data(), scheme.size());
|
||||
+ if (scheme_ == "*") {
|
||||
@@ -5167,7 +5159,7 @@ new file mode 100755
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool URLPattern::IsValidScheme(base::StringPiece scheme) const {
|
||||
+bool URLPattern::IsValidScheme(std::string_view scheme) const {
|
||||
+ if (valid_schemes_ == SCHEME_ALL)
|
||||
+ return true;
|
||||
+
|
||||
@@ -5179,7 +5171,7 @@ new file mode 100755
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void URLPattern::SetPath(base::StringPiece path) {
|
||||
+void URLPattern::SetPath(std::string_view path) {
|
||||
+ spec_.clear();
|
||||
+ path_.assign(path.data(), path.size());
|
||||
+ path_escaped_ = path_;
|
||||
@@ -5187,7 +5179,7 @@ new file mode 100755
|
||||
+ base::ReplaceSubstringsAfterOffset(&path_escaped_, 0, "?", "\\?");
|
||||
+}
|
||||
+
|
||||
+bool URLPattern::SetPort(base::StringPiece port) {
|
||||
+bool URLPattern::SetPort(std::string_view port) {
|
||||
+ spec_.clear();
|
||||
+ if (IsValidPortForScheme(scheme_, port)) {
|
||||
+ port_.assign(port.data(), port.size());
|
||||
@@ -5252,14 +5244,14 @@ new file mode 100755
|
||||
+ return MatchesSecurityOriginHelper(*test_url);
|
||||
+}
|
||||
+
|
||||
+bool URLPattern::MatchesScheme(base::StringPiece test) const {
|
||||
+bool URLPattern::MatchesScheme(std::string_view test) const {
|
||||
+ if (!IsValidScheme(test))
|
||||
+ return false;
|
||||
+
|
||||
+ return scheme_ == "*" || test == scheme_;
|
||||
+}
|
||||
+
|
||||
+bool URLPattern::MatchesHost(base::StringPiece host) const {
|
||||
+bool URLPattern::MatchesHost(std::string_view host) const {
|
||||
+ // TODO(devlin): This is a bit sad. Parsing urls is expensive. However, it's
|
||||
+ // important that we do this conversion to a GURL in order to canonicalize the
|
||||
+ // host (the pattern's host_ already is canonicalized from Parse()). We can't
|
||||
@@ -5270,8 +5262,8 @@ new file mode 100755
|
||||
+}
|
||||
+
|
||||
+bool URLPattern::MatchesHost(const GURL& test) const {
|
||||
+ base::StringPiece test_host(CanonicalizeHostForMatching(test.host_piece()));
|
||||
+ const base::StringPiece pattern_host(CanonicalizeHostForMatching(host_));
|
||||
+ std::string_view test_host(CanonicalizeHostForMatching(test.host_piece()));
|
||||
+ const std::string_view pattern_host(CanonicalizeHostForMatching(host_));
|
||||
+
|
||||
+ // If the hosts are exactly equal, we have a match.
|
||||
+ if (test_host == pattern_host)
|
||||
@@ -5337,7 +5329,7 @@ new file mode 100755
|
||||
+ return !MatchesEffectiveTld() && scheme_ != "*" && !match_subdomains_;
|
||||
+}
|
||||
+
|
||||
+bool URLPattern::MatchesPath(base::StringPiece test) const {
|
||||
+bool URLPattern::MatchesPath(std::string_view test) const {
|
||||
+ // Make the behaviour of OverlapsWith consistent with MatchesURL, which is
|
||||
+ // need to match hosted apps on e.g. 'google.com' also run on 'google.com/'.
|
||||
+ // The below if is a no-copy way of doing (test + "/*" == path_escaped_).
|
||||
@@ -5460,12 +5452,12 @@ new file mode 100755
|
||||
+
|
||||
+ // Note: Alias the function type (rather than using auto) because
|
||||
+ // MatchesHost() is overloaded.
|
||||
+ using match_function_type = bool (URLPattern::*)(base::StringPiece) const;
|
||||
+ using match_function_type = bool (URLPattern::*)(std::string_view) const;
|
||||
+
|
||||
+ auto get_intersection = [this, &other](base::StringPiece own_str,
|
||||
+ base::StringPiece other_str,
|
||||
+ auto get_intersection = [this, &other](std::string_view own_str,
|
||||
+ std::string_view other_str,
|
||||
+ match_function_type match_function,
|
||||
+ base::StringPiece* out) {
|
||||
+ std::string_view* out) {
|
||||
+ if ((this->*match_function)(other_str)) {
|
||||
+ *out = other_str;
|
||||
+ return true;
|
||||
@@ -5477,10 +5469,10 @@ new file mode 100755
|
||||
+ return false;
|
||||
+ };
|
||||
+
|
||||
+ base::StringPiece scheme;
|
||||
+ base::StringPiece host;
|
||||
+ base::StringPiece port;
|
||||
+ base::StringPiece path;
|
||||
+ std::string_view scheme;
|
||||
+ std::string_view host;
|
||||
+ std::string_view port;
|
||||
+ std::string_view path;
|
||||
+ // If any pieces fail to overlap, then there is no intersection.
|
||||
+ if (!get_intersection(scheme_, other.scheme_, &URLPattern::MatchesScheme,
|
||||
+ &scheme) ||
|
||||
@@ -5492,14 +5484,14 @@ new file mode 100755
|
||||
+ }
|
||||
+
|
||||
+ // Only match subdomains if both patterns match subdomains.
|
||||
+ base::StringPiece subdomains;
|
||||
+ std::string_view subdomains;
|
||||
+ if (match_subdomains_ && other.match_subdomains_) {
|
||||
+ // The host may be empty (e.g., in the case of *://*/* - in that case, only
|
||||
+ // append '*' instead of '*.'.
|
||||
+ subdomains = host.empty() ? "*" : "*.";
|
||||
+ }
|
||||
+
|
||||
+ base::StringPiece scheme_separator =
|
||||
+ std::string_view scheme_separator =
|
||||
+ IsStandardScheme(scheme) ? url::kStandardSchemeSeparator : ":";
|
||||
+
|
||||
+ std::string pattern_str = base::StrCat(
|
||||
@@ -5546,7 +5538,7 @@ new file mode 100755
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool URLPattern::MatchesPortPattern(base::StringPiece port) const {
|
||||
+bool URLPattern::MatchesPortPattern(std::string_view port) const {
|
||||
+ return port_ == "*" || port_ == port;
|
||||
+}
|
||||
+
|
||||
@@ -5685,7 +5677,7 @@ new file mode 100755
|
||||
+ static const char kAllUrlsPattern[];
|
||||
+
|
||||
+ // Returns true if the given |scheme| is considered valid for extensions.
|
||||
+ static bool IsValidSchemeForExtensions(base::StringPiece scheme);
|
||||
+ static bool IsValidSchemeForExtensions(std::string_view scheme);
|
||||
+
|
||||
+ // Returns the mask for all schemes considered valid for extensions.
|
||||
+ static int GetValidSchemeMaskForExtensions();
|
||||
@@ -5694,7 +5686,7 @@ new file mode 100755
|
||||
+
|
||||
+ // Convenience to construct a URLPattern from a string. If the string is not
|
||||
+ // known ahead of time, use Parse() instead, which returns success or failure.
|
||||
+ URLPattern(int valid_schemes, base::StringPiece pattern);
|
||||
+ URLPattern(int valid_schemes, std::string_view pattern);
|
||||
+
|
||||
+ URLPattern();
|
||||
+ URLPattern(const URLPattern& other);
|
||||
@@ -5712,7 +5704,7 @@ new file mode 100755
|
||||
+ // URLPattern::ParseResult::kSuccess on success, or an error code otherwise.
|
||||
+ // On failure, this instance will have some intermediate values and is in an
|
||||
+ // invalid state.
|
||||
+ ParseResult Parse(base::StringPiece pattern_str);
|
||||
+ ParseResult Parse(std::string_view pattern_str);
|
||||
+
|
||||
+ // Gets the bitmask of valid schemes.
|
||||
+ int valid_schemes() const { return valid_schemes_; }
|
||||
@@ -5721,7 +5713,7 @@ new file mode 100755
|
||||
+ // Gets the host the pattern matches. This can be an empty string if the
|
||||
+ // pattern matches all hosts (the input was <scheme>://*/<whatever>).
|
||||
+ const std::string& host() const { return host_; }
|
||||
+ void SetHost(base::StringPiece host);
|
||||
+ void SetHost(std::string_view host);
|
||||
+
|
||||
+ // Gets whether to match subdomains of host().
|
||||
+ bool match_subdomains() const { return match_subdomains_; }
|
||||
@@ -5730,7 +5722,7 @@ new file mode 100755
|
||||
+ // Gets the path the pattern matches with the leading slash. This can have
|
||||
+ // embedded asterisks which are interpreted using glob rules.
|
||||
+ const std::string& path() const { return path_; }
|
||||
+ void SetPath(base::StringPiece path);
|
||||
+ void SetPath(std::string_view path);
|
||||
+
|
||||
+ // Returns true if this pattern matches all (valid) urls.
|
||||
+ bool match_all_urls() const { return match_all_urls_; }
|
||||
@@ -5739,14 +5731,14 @@ new file mode 100755
|
||||
+ // Sets the scheme for pattern matches. This can be a single '*' if the
|
||||
+ // pattern matches all valid schemes (as defined by the valid_schemes_
|
||||
+ // property). Returns false on failure (if the scheme is not valid).
|
||||
+ bool SetScheme(base::StringPiece scheme);
|
||||
+ bool SetScheme(std::string_view scheme);
|
||||
+ // Note: You should use MatchesScheme() instead of this getter unless you
|
||||
+ // absolutely need the exact scheme. This is exposed for testing.
|
||||
+ const std::string& scheme() const { return scheme_; }
|
||||
+
|
||||
+ // Returns true if the specified scheme can be used in this URL pattern, and
|
||||
+ // false otherwise. Uses valid_schemes_ to determine validity.
|
||||
+ bool IsValidScheme(base::StringPiece scheme) const;
|
||||
+ bool IsValidScheme(std::string_view scheme) const;
|
||||
+
|
||||
+ // Returns true if this instance matches the specified URL. Always returns
|
||||
+ // false for invalid URLs.
|
||||
@@ -5759,14 +5751,14 @@ new file mode 100755
|
||||
+ // Note that if test is "filesystem", this may fail whereas MatchesURL
|
||||
+ // may succeed. MatchesURL is smart enough to look at the inner_url instead
|
||||
+ // of the outer "filesystem:" part.
|
||||
+ bool MatchesScheme(base::StringPiece test) const;
|
||||
+ bool MatchesScheme(std::string_view test) const;
|
||||
+
|
||||
+ // Returns true if |test| matches our host.
|
||||
+ bool MatchesHost(base::StringPiece test) const;
|
||||
+ bool MatchesHost(std::string_view test) const;
|
||||
+ bool MatchesHost(const GURL& test) const;
|
||||
+
|
||||
+ // Returns true if |test| matches our path.
|
||||
+ bool MatchesPath(base::StringPiece test) const;
|
||||
+ bool MatchesPath(std::string_view test) const;
|
||||
+
|
||||
+ // Returns true if the pattern matches all patterns in an (e)TLD. This
|
||||
+ // includes patterns like *://*.com/*, *://*.co.uk/*, etc. A pattern that
|
||||
@@ -5789,7 +5781,7 @@ new file mode 100755
|
||||
+ bool MatchesSingleOrigin() const;
|
||||
+
|
||||
+ // Sets the port. Returns false if the port is invalid.
|
||||
+ bool SetPort(base::StringPiece port);
|
||||
+ bool SetPort(std::string_view port);
|
||||
+ const std::string& port() const { return port_; }
|
||||
+
|
||||
+ // Returns a string representing this instance.
|
||||
@@ -5851,7 +5843,7 @@ new file mode 100755
|
||||
+ bool MatchesSecurityOriginHelper(const GURL& test) const;
|
||||
+
|
||||
+ // Returns true if our port matches the |port| pattern (it may be "*").
|
||||
+ bool MatchesPortPattern(base::StringPiece port) const;
|
||||
+ bool MatchesPortPattern(std::string_view port) const;
|
||||
+
|
||||
+ // If the URLPattern contains a wildcard scheme, returns a list of
|
||||
+ // equivalent literal schemes, otherwise returns the current scheme.
|
||||
@@ -6836,16 +6828,16 @@ new file mode 100755
|
||||
+
|
||||
+ // If external_content_ is set returns it as content otherwise it returns
|
||||
+ // content_
|
||||
+ const base::StringPiece GetContent() const {
|
||||
+ const std::string_view GetContent() const {
|
||||
+ if (external_content_.data())
|
||||
+ return external_content_;
|
||||
+ else
|
||||
+ return content_;
|
||||
+ }
|
||||
+ void set_external_content(const base::StringPiece& content) {
|
||||
+ void set_external_content(const std::string_view& content) {
|
||||
+ external_content_ = content;
|
||||
+ }
|
||||
+ void set_content(const base::StringPiece& content) {
|
||||
+ void set_content(const std::string_view& content) {
|
||||
+ content_.assign(content.begin(), content.end());
|
||||
+ }
|
||||
+
|
||||
@@ -6870,7 +6862,7 @@ new file mode 100755
|
||||
+
|
||||
+ // The script content. It can be set to either loaded_content_ or
|
||||
+ // externally allocated string.
|
||||
+ base::StringPiece external_content_;
|
||||
+ std::string_view external_content_;
|
||||
+
|
||||
+ // Set when the content is loaded by LoadContent
|
||||
+ std::string content_;
|
||||
@@ -7244,7 +7236,7 @@ new file mode 100755
|
||||
+ // Why? Is it just because we don't expose those types to JS?
|
||||
+ static const struct {
|
||||
+ ViewType type;
|
||||
+ base::StringPiece name;
|
||||
+ std::string_view name;
|
||||
+ } constexpr kTypeMap[] = {
|
||||
+ // {VIEW_TYPE_APP_WINDOW, "APP_WINDOW"},
|
||||
+ // {VIEW_TYPE_EXTENSION_BACKGROUND_PAGE, "BACKGROUND"},
|
||||
@@ -8120,7 +8112,7 @@ new file mode 100755
|
||||
+ }
|
||||
+ void OnDestruct() override { injection_->invalidate_render_frame(); }
|
||||
+
|
||||
+ ScriptInjection* injection_;
|
||||
+ raw_ptr<ScriptInjection> injection_;
|
||||
+};
|
||||
+
|
||||
+// static
|
||||
@@ -8442,7 +8434,7 @@ new file mode 100755
|
||||
+ std::unique_ptr<ScriptInjector> injector_;
|
||||
+
|
||||
+ // The RenderFrame into which this should inject the script.
|
||||
+ content::RenderFrame* render_frame_;
|
||||
+ raw_ptr<content::RenderFrame> render_frame_;
|
||||
+
|
||||
+ // The associated injection host.
|
||||
+ std::unique_ptr<const InjectionHost> injection_host_;
|
||||
@@ -8573,7 +8565,7 @@ new file mode 100755
|
||||
+ void InvalidateAndResetFrame(bool force_reset);
|
||||
+
|
||||
+ // The owning ScriptInjectionManager.
|
||||
+ ScriptInjectionManager* manager_;
|
||||
+ raw_ptr<ScriptInjectionManager> manager_;
|
||||
+
|
||||
+ bool should_run_idle_ = true; // commit @9f2aac4
|
||||
+
|
||||
@@ -8986,7 +8978,7 @@ new file mode 100755
|
||||
+ std::vector<std::unique_ptr<RFOHelper>> rfo_helpers_;
|
||||
+
|
||||
+ // The set of UserScripts associated with extensions. Owned by the Dispatcher.
|
||||
+ UserScriptSetManager* user_script_set_manager_;
|
||||
+ raw_ptr<UserScriptSetManager> user_script_set_manager_;
|
||||
+
|
||||
+ // Pending injections which are waiting for either the proper run location or
|
||||
+ // user consent.
|
||||
@@ -9518,12 +9510,12 @@ new file mode 100755
|
||||
+
|
||||
+ // The associated user script. Owned by the UserScriptInjector that created
|
||||
+ // this object.
|
||||
+ const UserScript* script_;
|
||||
+ raw_ptr<const UserScript> script_;
|
||||
+
|
||||
+ // The UserScriptSet that eventually owns the UserScript this
|
||||
+ // UserScriptInjector points to.
|
||||
+ // Outlives |this|.
|
||||
+ UserScriptSet* const user_script_set_;
|
||||
+ const raw_ptr<UserScriptSet> user_script_set_;
|
||||
+
|
||||
+ // The id of the associated user script. We cache this because when we update
|
||||
+ // the |script_| associated with this injection, the old referance may be
|
||||
@@ -9677,14 +9669,14 @@ new file mode 100755
|
||||
+ size_t body_length = 0;
|
||||
+ CHECK(iter.ReadData(&body, &body_length));
|
||||
+ script->js_scripts()[j]->set_external_content(
|
||||
+ base::StringPiece(body, body_length));
|
||||
+ std::string_view(body, body_length));
|
||||
+ }
|
||||
+ for (size_t j = 0; j < script->css_scripts().size(); ++j) {
|
||||
+ const char* body = NULL;
|
||||
+ size_t body_length = 0;
|
||||
+ CHECK(iter.ReadData(&body, &body_length));
|
||||
+ script->css_scripts()[j]->set_external_content(
|
||||
+ base::StringPiece(body, body_length));
|
||||
+ std::string_view(body, body_length));
|
||||
+ }
|
||||
+
|
||||
+ if (only_inject_incognito && !script->is_incognito_enabled())
|
||||
@@ -9776,7 +9768,7 @@ new file mode 100755
|
||||
+ return iter->second;
|
||||
+ }
|
||||
+
|
||||
+ base::StringPiece script_content = file.GetContent();
|
||||
+ std::string_view script_content = file.GetContent();
|
||||
+ blink::WebString source;
|
||||
+ if (emulate_greasemonkey) {
|
||||
+ // We add this dumb function wrapper for user scripts to emulate what
|
||||
@@ -9798,7 +9790,7 @@ new file mode 100755
|
||||
+ if (iter != script_sources_.end())
|
||||
+ return iter->second;
|
||||
+
|
||||
+ base::StringPiece script_content = file.GetContent();
|
||||
+ std::string_view script_content = file.GetContent();
|
||||
+ return script_sources_
|
||||
+ .insert(std::make_pair(
|
||||
+ url, blink::WebString::FromUTF8(script_content)))
|
||||
|
||||
@@ -55,7 +55,6 @@ deactivation of all pop-ups (default disabled)
|
||||
.../browser/adblock_url_loader_factory.h | 7 +-
|
||||
.../browser/adblock_webcontents_observer.cc | 25 +-
|
||||
.../browser/adblock_webcontents_observer.h | 5 +-
|
||||
.../content_security_policy_injector_impl.cc | 1 +
|
||||
.../content/browser/element_hider_impl.cc | 2 +-
|
||||
.../browser/frame_hierarchy_builder.cc | 3 +-
|
||||
.../browser/resource_classification_runner.h | 9 +
|
||||
@@ -89,7 +88,7 @@ deactivation of all pop-ups (default disabled)
|
||||
.../serializer/flatbuffer_serializer.cc | 82 +-
|
||||
components/adblock/core/features.cc | 3 +-
|
||||
components/adblock/core/hash/schema_hash.h | 10 +
|
||||
.../adblock/core/sitekey_storage_impl.cc | 7 +
|
||||
.../adblock/core/sitekey_storage_impl.cc | 11 +-
|
||||
.../core/subscription/conversion_executors.h | 1 +
|
||||
.../filtering_configuration_maintainer.h | 4 +
|
||||
...filtering_configuration_maintainer_impl.cc | 31 +-
|
||||
@@ -131,7 +130,7 @@ deactivation of all pop-ups (default disabled)
|
||||
.../blink/renderer/core/css/style_engine.h | 1 +
|
||||
.../renderer/core/exported/web_document.cc | 15 +-
|
||||
.../definitions/adblock_private.d.ts | 14 +
|
||||
121 files changed, 6140 insertions(+), 1301 deletions(-)
|
||||
120 files changed, 6140 insertions(+), 1304 deletions(-)
|
||||
create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.html
|
||||
create mode 100644 chrome/browser/resources/settings/adblock_page/adblock_page.ts
|
||||
rename components/adblock/android/java/res/xml/{adblock_preferences.xml => eyeo_adblock_preferences.xml} (56%)
|
||||
@@ -2893,17 +2892,6 @@ diff --git a/components/adblock/content/browser/adblock_webcontents_observer.h b
|
||||
+ raw_ptr<HostContentSettingsMap> settings_map_ = nullptr;
|
||||
};
|
||||
#endif // COMPONENTS_ADBLOCK_CONTENT_BROWSER_ADBLOCK_WEBCONTENTS_OBSERVER_H_
|
||||
diff --git a/components/adblock/content/browser/content_security_policy_injector_impl.cc b/components/adblock/content/browser/content_security_policy_injector_impl.cc
|
||||
--- a/components/adblock/content/browser/content_security_policy_injector_impl.cc
|
||||
+++ b/components/adblock/content/browser/content_security_policy_injector_impl.cc
|
||||
@@ -36,6 +36,7 @@ std::set<base::StringPiece> GetCspInjections(
|
||||
const std::vector<GURL> frame_hierarchy_chain) {
|
||||
TRACE_EVENT1("eyeo", "GetCspInjection", "url", request_url.spec());
|
||||
std::set<base::StringPiece> injections;
|
||||
+ if ((true)) return injections;
|
||||
for (const auto& collection : subscription_collections) {
|
||||
const auto injection =
|
||||
collection->GetCspInjections(request_url, frame_hierarchy_chain);
|
||||
diff --git a/components/adblock/content/browser/element_hider_impl.cc b/components/adblock/content/browser/element_hider_impl.cc
|
||||
--- a/components/adblock/content/browser/element_hider_impl.cc
|
||||
+++ b/components/adblock/content/browser/element_hider_impl.cc
|
||||
@@ -4420,7 +4408,7 @@ diff --git a/components/adblock/core/converter/parser/url_filter.cc b/components
|
||||
+ }
|
||||
piece.remove_suffix(1);
|
||||
}
|
||||
if (piece.find('|') == base::StringPiece::npos) {
|
||||
if (piece.find('|') == std::string_view::npos) {
|
||||
@@ -108,21 +112,21 @@ std::optional<UrlFilter> UrlFilter::FromString(std::string filter_str) {
|
||||
|
||||
if (options->Csp().has_value() && options->Csp().value().empty() &&
|
||||
@@ -4656,7 +4644,18 @@ new file mode 100644
|
||||
diff --git a/components/adblock/core/sitekey_storage_impl.cc b/components/adblock/core/sitekey_storage_impl.cc
|
||||
--- a/components/adblock/core/sitekey_storage_impl.cc
|
||||
+++ b/components/adblock/core/sitekey_storage_impl.cc
|
||||
@@ -37,6 +37,8 @@ void SitekeyStorageImpl::ProcessResponseHeaders(
|
||||
@@ -27,9 +27,7 @@
|
||||
|
||||
namespace adblock {
|
||||
|
||||
-SitekeyStorageImpl::SitekeyStorageImpl() {
|
||||
- crypto::EnsureOpenSSLInit();
|
||||
-}
|
||||
+SitekeyStorageImpl::SitekeyStorageImpl() {}
|
||||
|
||||
SitekeyStorageImpl::~SitekeyStorageImpl() = default;
|
||||
|
||||
@@ -37,6 +35,8 @@ void SitekeyStorageImpl::ProcessResponseHeaders(
|
||||
const GURL& request_url,
|
||||
const scoped_refptr<net::HttpResponseHeaders>& headers,
|
||||
const std::string& user_agent) {
|
||||
@@ -4665,7 +4664,7 @@ diff --git a/components/adblock/core/sitekey_storage_impl.cc b/components/adbloc
|
||||
if (user_agent.empty()) {
|
||||
LOG(WARNING) << "[eyeo] No user agent info";
|
||||
return;
|
||||
@@ -53,6 +55,7 @@ void SitekeyStorageImpl::ProcessResponseHeaders(
|
||||
@@ -53,6 +53,7 @@ void SitekeyStorageImpl::ProcessResponseHeaders(
|
||||
|
||||
std::optional<std::pair<GURL, SiteKey>>
|
||||
SitekeyStorageImpl::FindSiteKeyForAnyUrl(const std::vector<GURL>& urls) const {
|
||||
@@ -4673,7 +4672,7 @@ diff --git a/components/adblock/core/sitekey_storage_impl.cc b/components/adbloc
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
for (const auto& url : urls) {
|
||||
auto elem = url_to_sitekey_map_.find(url);
|
||||
@@ -66,6 +69,8 @@ SitekeyStorageImpl::FindSiteKeyForAnyUrl(const std::vector<GURL>& urls) const {
|
||||
@@ -66,6 +67,8 @@ SitekeyStorageImpl::FindSiteKeyForAnyUrl(const std::vector<GURL>& urls) const {
|
||||
void SitekeyStorageImpl::ProcessSiteKey(const GURL& request_url,
|
||||
const SiteKey& site_key,
|
||||
const std::string& user_agent) {
|
||||
@@ -4682,7 +4681,7 @@ diff --git a/components/adblock/core/sitekey_storage_impl.cc b/components/adbloc
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
DCHECK(!site_key.value().empty());
|
||||
auto site_key_pair = FindSiteKeyForAnyUrl({request_url});
|
||||
@@ -116,6 +121,8 @@ bool SitekeyStorageImpl::IsSitekeySignatureValid(
|
||||
@@ -116,6 +119,8 @@ bool SitekeyStorageImpl::IsSitekeySignatureValid(
|
||||
const std::string& public_key_b64,
|
||||
const std::string& signature_b64,
|
||||
const std::string& data) const {
|
||||
|
||||
@@ -8,12 +8,14 @@ https://bugs.chromium.org/p/chromium/issues/detail?id=1491776#c10
|
||||
BUILD.gn | 1 -
|
||||
.../navigation_predictor_metrics_document_data.h | 2 ++
|
||||
chrome/browser/safe_browsing/BUILD.gn | 1 +
|
||||
chrome/browser/ui/browser_commands.cc | 1 +
|
||||
.../webid/fedcm_account_selection_view_desktop.cc | 1 +
|
||||
.../omnibox/browser/autocomplete_classifier.cc | 4 ++--
|
||||
components/omnibox/browser/omnibox_field_trial.cc | 4 ++--
|
||||
.../phishing_classifier/phishing_image_embedder.cc | 14 +++-----------
|
||||
content/browser/browser_interface_binders.cc | 1 +
|
||||
net/BUILD.gn | 1 +
|
||||
8 files changed, 12 insertions(+), 16 deletions(-)
|
||||
10 files changed, 14 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
--- a/BUILD.gn
|
||||
@@ -49,6 +51,28 @@ diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsin
|
||||
]
|
||||
if (safe_browsing_mode == 1) {
|
||||
# "Safe Browsing Full" files in addition to the "basic" ones to use for
|
||||
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
|
||||
--- a/chrome/browser/ui/browser_commands.cc
|
||||
+++ b/chrome/browser/ui/browser_commands.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "chrome/browser/ui/browser_commands.h"
|
||||
|
||||
#include <memory>
|
||||
+#include <numeric>
|
||||
#include <optional>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
diff --git a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
|
||||
--- a/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
|
||||
+++ b/chrome/browser/ui/views/webid/fedcm_account_selection_view_desktop.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
+#include "base/metrics/histogram_functions.h"
|
||||
#include "chrome/browser/accessibility/accessibility_state_utils.h"
|
||||
#include "chrome/browser/net/system_network_context_manager.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
diff --git a/components/omnibox/browser/autocomplete_classifier.cc b/components/omnibox/browser/autocomplete_classifier.cc
|
||||
--- a/components/omnibox/browser/autocomplete_classifier.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_classifier.cc
|
||||
|
||||
@@ -59,6 +59,12 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../browser/feed/FeedListContentManager.java | 6 +-
|
||||
.../flags/android/chrome_feature_list.cc | 3 +
|
||||
.../browser/flags/ChromeFeatureList.java | 10 ++
|
||||
chrome/browser/hub/internal/BUILD.gn | 5 +
|
||||
.../chrome/browser/hub/HubCoordinator.java | 8 +
|
||||
.../chrome/browser/hub/HubManagerImpl.java | 17 +-
|
||||
.../browser/hub/ReversedLinearLayout.java | 42 +++++
|
||||
.../android/res/layout/hub_layout.xml | 4 +-
|
||||
.../android/res/layout/hub_toolbar_layout.xml | 2 +-
|
||||
chrome/browser/prefs/browser_prefs.cc | 2 +-
|
||||
.../chrome/browser/ui/appmenu/AppMenu.java | 40 ++++-
|
||||
.../ui/appmenu/AppMenuHandlerImpl.java | 10 ++
|
||||
@@ -85,7 +91,8 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../AccessibilitySettingsDelegate.java | 7 +
|
||||
.../render_widget_host_view_android.cc | 3 +
|
||||
.../Move-navigation-bar-to-bottom.inc | 17 ++
|
||||
72 files changed, 930 insertions(+), 74 deletions(-)
|
||||
78 files changed, 1002 insertions(+), 80 deletions(-)
|
||||
create mode 100644 chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Move-navigation-bar-to-bottom.inc
|
||||
|
||||
diff --git a/cc/base/features.cc b/cc/base/features.cc
|
||||
@@ -1962,6 +1969,192 @@ diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/f
|
||||
sPaintPreviewDemo,
|
||||
sPrefetchBrowserInitiatedTriggers,
|
||||
sQueryTiles,
|
||||
diff --git a/chrome/browser/hub/internal/BUILD.gn b/chrome/browser/hub/internal/BUILD.gn
|
||||
--- a/chrome/browser/hub/internal/BUILD.gn
|
||||
+++ b/chrome/browser/hub/internal/BUILD.gn
|
||||
@@ -16,6 +16,7 @@ android_library("java") {
|
||||
"//chrome/test/android:chrome_java_transit",
|
||||
]
|
||||
sources = [
|
||||
+ "android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java",
|
||||
"android/java/src/org/chromium/chrome/browser/hub/ApplyButtonData.java",
|
||||
"android/java/src/org/chromium/chrome/browser/hub/FadeHubLayoutAnimationFactory.java",
|
||||
"android/java/src/org/chromium/chrome/browser/hub/FadeHubLayoutAnimationFactoryImpl.java",
|
||||
@@ -68,6 +69,10 @@ android_library("java") {
|
||||
"//third_party/androidx:androidx_interpolator_interpolator_java",
|
||||
"//ui/android:ui_no_recycler_view_java",
|
||||
]
|
||||
+ deps += [
|
||||
+ "//base:base_cached_flags_java",
|
||||
+ "//chrome/browser/flags:java",
|
||||
+ ]
|
||||
}
|
||||
|
||||
android_resources("java_resources") {
|
||||
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java
|
||||
--- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java
|
||||
+++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java
|
||||
@@ -8,6 +8,7 @@ import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
+import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -18,6 +19,7 @@ import org.chromium.base.supplier.ObservableSupplierImpl;
|
||||
import org.chromium.base.supplier.OneshotSupplier;
|
||||
import org.chromium.base.supplier.TransitiveObservableSupplier;
|
||||
import org.chromium.chrome.browser.feature_engagement.TrackerFactory;
|
||||
+import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.profiles.ProfileProvider;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
import org.chromium.chrome.browser.toolbar.menu_button.MenuButtonCoordinator;
|
||||
@@ -93,6 +95,12 @@ public class HubCoordinator implements PaneHubController, BackPressHandler {
|
||||
HubPaneHostView hubPaneHostView = mContainerView.findViewById(R.id.hub_pane_host);
|
||||
mHubPaneHostCoordinator =
|
||||
new HubPaneHostCoordinator(hubPaneHostView, paneManager.getFocusedPaneSupplier());
|
||||
+ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled()) {
|
||||
+ LinearLayout.LayoutParams params = (LinearLayout.LayoutParams)
|
||||
+ hubPaneHostView.getLayoutParams();
|
||||
+ params.bottomMargin = hubToolbarView.getHeight();
|
||||
+ hubPaneHostView.setLayoutParams(params);
|
||||
+ }
|
||||
|
||||
mHubLayoutController = hubLayoutController;
|
||||
mHandleBackPressSupplier = new ObservableSupplierImpl<>();
|
||||
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java
|
||||
--- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java
|
||||
+++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java
|
||||
@@ -6,6 +6,7 @@ package org.chromium.chrome.browser.hub;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
+import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout.LayoutParams;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
@@ -16,6 +17,7 @@ import org.chromium.base.ValueChangedCallback;
|
||||
import org.chromium.base.supplier.ObservableSupplier;
|
||||
import org.chromium.base.supplier.ObservableSupplierImpl;
|
||||
import org.chromium.base.supplier.OneshotSupplier;
|
||||
+import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.back_press.BackPressManager;
|
||||
import org.chromium.chrome.browser.profiles.ProfileProvider;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
@@ -111,7 +113,10 @@ public class HubManagerImpl implements HubManager, HubController {
|
||||
LayoutParams params = (LayoutParams) mHubContainerView.getLayoutParams();
|
||||
assert params != null : "HubContainerView should always have layout params.";
|
||||
mStatusIndicatorHeight = height;
|
||||
- params.topMargin = mStatusIndicatorHeight + mAppHeaderHeight;
|
||||
+ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled())
|
||||
+ params.bottomMargin = mStatusIndicatorHeight + mAppHeaderHeight;
|
||||
+ else
|
||||
+ params.topMargin = mStatusIndicatorHeight + mAppHeaderHeight;
|
||||
mHubContainerView.setLayoutParams(params);
|
||||
}
|
||||
|
||||
@@ -121,7 +126,10 @@ public class HubManagerImpl implements HubManager, HubController {
|
||||
LayoutParams params = (LayoutParams) mHubContainerView.getLayoutParams();
|
||||
assert params != null : "HubContainerView should always have layout params.";
|
||||
mAppHeaderHeight = height;
|
||||
- params.topMargin = mStatusIndicatorHeight + mAppHeaderHeight;
|
||||
+ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled())
|
||||
+ params.bottomMargin = mStatusIndicatorHeight + mAppHeaderHeight;
|
||||
+ else
|
||||
+ params.topMargin = mStatusIndicatorHeight + mAppHeaderHeight;
|
||||
mHubContainerView.setLayoutParams(params);
|
||||
}
|
||||
|
||||
@@ -242,6 +250,9 @@ public class HubManagerImpl implements HubManager, HubController {
|
||||
mMenuOrKeyboardActionController.registerMenuOrKeyboardActionHandler(
|
||||
menuOrKeyboardActionHandler);
|
||||
}
|
||||
- mSnackbarManager.setParentView(mHubContainerView);
|
||||
+ if (ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled())
|
||||
+ mSnackbarManager.setParentView((ViewGroup)getPaneHostView());
|
||||
+ else
|
||||
+ mSnackbarManager.setParentView(mHubContainerView);
|
||||
}
|
||||
}
|
||||
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/ReversedLinearLayout.java
|
||||
@@ -0,0 +1,42 @@
|
||||
+package org.chromium.chrome.browser.hub;
|
||||
+
|
||||
+import android.content.Context;
|
||||
+import android.util.AttributeSet;
|
||||
+import android.widget.LinearLayout;
|
||||
+import android.view.Gravity;
|
||||
+import android.view.View;
|
||||
+
|
||||
+import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
+
|
||||
+public class ReversedLinearLayout extends LinearLayout {
|
||||
+ private boolean mReversedLayout;
|
||||
+
|
||||
+ public ReversedLinearLayout(Context context) {
|
||||
+ super(context);
|
||||
+ setReversedLayout();
|
||||
+ }
|
||||
+
|
||||
+ public ReversedLinearLayout(Context context, AttributeSet attrs) {
|
||||
+ super(context, attrs);
|
||||
+ setReversedLayout();
|
||||
+ }
|
||||
+
|
||||
+ public ReversedLinearLayout(Context context, AttributeSet attrs, int defStyle) {
|
||||
+ super(context, attrs, defStyle);
|
||||
+ setReversedLayout();
|
||||
+ }
|
||||
+
|
||||
+ private void setReversedLayout() {
|
||||
+ mReversedLayout = ChromeFeatureList.sMoveTopToolbarToBottom.isEnabled();
|
||||
+ if (mReversedLayout)
|
||||
+ setGravity(Gravity.START | Gravity.BOTTOM);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public View getChildAt(int i) {
|
||||
+ if (mReversedLayout)
|
||||
+ return super.getChildAt(getChildCount() - 1 - i);
|
||||
+ else
|
||||
+ return super.getChildAt(i);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/browser/hub/internal/android/res/layout/hub_layout.xml b/chrome/browser/hub/internal/android/res/layout/hub_layout.xml
|
||||
--- a/chrome/browser/hub/internal/android/res/layout/hub_layout.xml
|
||||
+++ b/chrome/browser/hub/internal/android/res/layout/hub_layout.xml
|
||||
@@ -4,7 +4,7 @@ Copyright 2023 The Chromium Authors
|
||||
Use of this source code is governed by a BSD-style license that can be
|
||||
found in the LICENSE file.
|
||||
-->
|
||||
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
+<org.chromium.chrome.browser.hub.ReversedLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
@@ -13,4 +13,4 @@ found in the LICENSE file.
|
||||
|
||||
<include layout="@layout/hub_pane_host_layout" />
|
||||
|
||||
-</LinearLayout>
|
||||
\ No newline at end of file
|
||||
+</org.chromium.chrome.browser.hub.ReversedLinearLayout>
|
||||
diff --git a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml b/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
--- a/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
+++ b/chrome/browser/hub/internal/android/res/layout/hub_toolbar_layout.xml
|
||||
@@ -9,7 +9,7 @@ found in the LICENSE file.
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/hub_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
- android:layout_height="wrap_content"
|
||||
+ android:layout_height="@dimen/toolbar_height_no_shadow"
|
||||
android:orientation="vertical">
|
||||
|
||||
<FrameLayout
|
||||
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
|
||||
--- a/chrome/browser/prefs/browser_prefs.cc
|
||||
+++ b/chrome/browser/prefs/browser_prefs.cc
|
||||
@@ -2598,7 +2791,7 @@ diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/brow
|
||||
/** Layout for the browser controls (omnibox, menu, tab strip, etc..). */
|
||||
public class ToolbarControlContainer extends OptimizedFrameLayout
|
||||
implements ControlContainer, DesktopWindowStateProvider.AppHeaderObserver {
|
||||
@@ -147,6 +151,11 @@ public class ToolbarControlContainer extends OptimizedFrameLayout
|
||||
@@ -143,6 +147,11 @@ public class ToolbarControlContainer extends OptimizedFrameLayout
|
||||
if (view != null)
|
||||
((MarginLayoutParams)view.getLayoutParams()).topMargin = tab_strip_height;
|
||||
}
|
||||
|
||||
@@ -896,7 +896,7 @@ diff --git a/services/network/network_context.h b/services/network/network_conte
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1544,6 +1544,7 @@ interface NetworkContext {
|
||||
@@ -1545,6 +1545,7 @@ interface NetworkContext {
|
||||
// implementation is currently specific for use by Signed Exchange.
|
||||
VerifyCertForSignedExchange(X509Certificate certificate,
|
||||
url.mojom.Url url,
|
||||
@@ -904,7 +904,7 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw
|
||||
string ocsp_response,
|
||||
string sct_list) => (int32 error_code,
|
||||
CertVerifyResult cv_result,
|
||||
@@ -1551,16 +1552,16 @@ interface NetworkContext {
|
||||
@@ -1552,16 +1553,16 @@ interface NetworkContext {
|
||||
|
||||
// Adds explicitly-specified data as if it was processed from an
|
||||
// HSTS header. Used by tests and implementation of chrome://net-internals.
|
||||
@@ -924,7 +924,7 @@ diff --git a/services/network/public/mojom/network_context.mojom b/services/netw
|
||||
=> (mojo_base.mojom.DictionaryValue state);
|
||||
|
||||
// Sets allowed and blocked origins respectively for the URLLoaderFactory
|
||||
@@ -1579,7 +1580,7 @@ interface NetworkContext {
|
||||
@@ -1580,7 +1581,7 @@ interface NetworkContext {
|
||||
// Deletes any dynamic data stored for |host| from the transport
|
||||
// security state. Returns true iff an entry was deleted.
|
||||
// See net::TransportSecurityState::DeleteDynamicDataForHost for more detail.
|
||||
|
||||
@@ -10,9 +10,9 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
storage/browser/blob/blob_url_store_impl.cc | 28 +++++++++++++++++++
|
||||
storage/browser/blob/blob_url_store_impl.h | 9 ++++++
|
||||
.../public/mojom/blob/blob_url_store.mojom | 10 +++++--
|
||||
.../public/mojom/blob/blob_url_store.mojom | 8 ++++--
|
||||
.../core/fileapi/public_url_manager.cc | 17 +++++++++++
|
||||
4 files changed, 62 insertions(+), 2 deletions(-)
|
||||
4 files changed, 60 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/storage/browser/blob/blob_url_store_impl.cc b/storage/browser/blob/blob_url_store_impl.cc
|
||||
--- a/storage/browser/blob/blob_url_store_impl.cc
|
||||
@@ -122,16 +122,14 @@ diff --git a/third_party/blink/public/mojom/blob/blob_url_store.mojom b/third_pa
|
||||
// TODO(https://crbug.com/1224926): Remove these once experiment is over.
|
||||
mojo_base.mojom.UnguessableToken? unsafe_agent_cluster_id,
|
||||
network.mojom.SchemefulSite? unsafe_top_level_site);
|
||||
@@ -51,7 +53,11 @@ interface BlobURLStore {
|
||||
@@ -51,7 +53,9 @@ interface BlobURLStore {
|
||||
// refer to, even after the URL is revoked.
|
||||
// As long as the token is alive, the resolved blob will also be kept alive.
|
||||
ResolveForNavigation(url.mojom.Url url,
|
||||
- pending_receiver<BlobURLToken> token) => (
|
||||
+ pending_receiver<BlobURLToken> token,
|
||||
+ mojo_base.mojom.UnguessableToken unsafe_agent_cluster_id,
|
||||
+ network.mojom.SchemefulSite? unsafe_top_level_site,
|
||||
+ mojo_base.mojom.UnguessableToken unsafe_agent_cluster_id,
|
||||
+ network.mojom.SchemefulSite? unsafe_top_level_site) => (
|
||||
+ network.mojom.SchemefulSite? unsafe_top_level_site) => (
|
||||
// TODO(https://crbug.com/1224926): Remove this once experiment is over.
|
||||
mojo_base.mojom.UnguessableToken? unsafe_agent_cluster_id);
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ diff --git a/components/policy/content/policy_blocklist_navigation_throttle.cc b
|
||||
}
|
||||
|
||||
bool PolicyBlocklistNavigationThrottle::IsBlockedViewSourceNavigation() {
|
||||
+ if ((true)) return false
|
||||
+ if ((true)) return false;
|
||||
content::NavigationEntry* nav_entry =
|
||||
navigation_handle()->GetNavigationEntry();
|
||||
if (!nav_entry || !nav_entry->IsViewSourceMode()) {
|
||||
|
||||
@@ -9,6 +9,7 @@ https://chromium-review.googlesource.com/c/chromium/src/+/5307559
|
||||
.../renderer/content_settings_agent_impl.cc | 38 ++++++++++++++++++-
|
||||
.../renderer/content_settings_agent_impl.h | 6 +++
|
||||
.../platform/web_content_settings_client.h | 12 ++++++
|
||||
.../renderer/core/frame/local_dom_window.cc | 6 ++-
|
||||
.../blink/renderer/core/frame/local_frame.cc | 13 -------
|
||||
.../blink/renderer/core/frame/local_frame.h | 6 ---
|
||||
.../renderer/core/html/html_meta_element.cc | 4 +-
|
||||
@@ -18,7 +19,7 @@ https://chromium-review.googlesource.com/c/chromium/src/+/5307559
|
||||
.../core/loader/frame_fetch_context.h | 13 ++++++-
|
||||
.../core/loader/worker_fetch_context.cc | 12 ++++--
|
||||
.../core/loader/worker_fetch_context.h | 2 +-
|
||||
14 files changed, 139 insertions(+), 38 deletions(-)
|
||||
15 files changed, 144 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/chrome/renderer/worker_content_settings_client.cc b/chrome/renderer/worker_content_settings_client.cc
|
||||
--- a/chrome/renderer/worker_content_settings_client.cc
|
||||
@@ -184,6 +185,29 @@ diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/t
|
||||
// Controls whether insecure scripts are allowed to execute for this frame.
|
||||
virtual bool AllowRunningInsecureContent(bool enabled_per_settings,
|
||||
const WebURL&) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "third_party/blink/public/platform/task_type.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/web/web_picture_in_picture_window_options.h"
|
||||
+#include "third_party/blink/renderer/core/loader/frame_fetch_context.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/binding_security.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/capture_source_location.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/isolated_world_csp.h"
|
||||
@@ -485,7 +486,10 @@ bool LocalDOMWindow::CanExecuteScripts(
|
||||
}
|
||||
return false;
|
||||
}
|
||||
- bool script_enabled = GetFrame()->ScriptEnabled();
|
||||
+ bool script_enabled =
|
||||
+ FrameFetchContext::AllowScriptFromSourceWithoutNotifying(
|
||||
+ Url(), GetFrame()->GetContentSettingsClient(),
|
||||
+ GetFrame()->GetSettings());
|
||||
if (!script_enabled && reason == kAboutToExecuteScript) {
|
||||
WebContentSettingsClient* settings_client =
|
||||
GetFrame()->GetContentSettingsClient();
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
|
||||
@@ -8,20 +8,27 @@ Until the real tab is opened, no data is retrieved.
|
||||
|
||||
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
---
|
||||
.../android/java/res/xml/homepage_preferences.xml | 6 ++++++
|
||||
.../chrome/browser/BrowserRestartActivity.java | 1 +
|
||||
.../chrome/browser/ChromeInactivityTracker.java | 13 +++++++++++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 2 ++
|
||||
.../chrome/browser/tasks/ReturnToChromeUtil.java | 12 +++++++++++-
|
||||
.../browser/preferences/ChromePreferenceKeys.java | 2 ++
|
||||
.../preferences/LegacyChromePreferenceKeys.java | 1 +
|
||||
.../single_tab/SingleTabSwitcherCoordinator.java | 2 +-
|
||||
.../single_tab/SingleTabSwitcherOnNtpMediator.java | 4 ++--
|
||||
.../show-ntp-at-startup.grdp | 9 +++++++++
|
||||
.../chrome_feature_list_cc/show-ntp-at-startup.inc | 2 ++
|
||||
11 files changed, 50 insertions(+), 4 deletions(-)
|
||||
.../java/res/xml/homepage_preferences.xml | 6 ++++
|
||||
.../browser/BrowserRestartActivity.java | 1 +
|
||||
.../browser/ChromeInactivityTracker.java | 14 ++++++++
|
||||
.../chrome/browser/ChromeTabbedActivity.java | 2 ++
|
||||
.../browser/tasks/ReturnToChromeUtil.java | 16 ++++++++-
|
||||
.../flags/android/chrome_feature_list.cc | 1 +
|
||||
.../cromite/sShowNtpAtStartupAndroid.java | 33 +++++++++++++++++++
|
||||
.../preferences/ChromePreferenceKeys.java | 2 ++
|
||||
.../LegacyChromePreferenceKeys.java | 1 +
|
||||
.../SingleTabSwitcherCoordinator.java | 2 +-
|
||||
.../SingleTabSwitcherOnNtpMediator.java | 4 +--
|
||||
.../show-ntp-at-startup.grdp | 9 +++++
|
||||
.../about_flags_cc/show-ntp-at-startup.inc | 12 +++++++
|
||||
.../show-ntp-at-startup.inc | 5 +++
|
||||
.../show-ntp-at-startup.inc | 1 +
|
||||
15 files changed, 105 insertions(+), 4 deletions(-)
|
||||
create mode 100644 chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/sShowNtpAtStartupAndroid.java
|
||||
create mode 100644 chrome/browser/ui/android/strings/cromite_android_chrome_strings_grd/show-ntp-at-startup.grdp
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/show-ntp-at-startup.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/show-ntp-at-startup.inc
|
||||
create mode 100644 cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/show-ntp-at-startup.inc
|
||||
|
||||
diff --git a/chrome/android/java/res/xml/homepage_preferences.xml b/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
--- a/chrome/android/java/res/xml/homepage_preferences.xml
|
||||
@@ -53,15 +60,18 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BrowserRestartA
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeInactivityTracker.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeInactivityTracker.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeInactivityTracker.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeInactivityTracker.java
|
||||
@@ -12,6 +12,7 @@ import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
|
||||
@@ -12,8 +12,10 @@ import org.chromium.chrome.browser.lifecycle.ActivityLifecycleDispatcher;
|
||||
import org.chromium.chrome.browser.lifecycle.DestroyObserver;
|
||||
import org.chromium.chrome.browser.lifecycle.PauseResumeWithNativeObserver;
|
||||
import org.chromium.chrome.browser.lifecycle.StartStopWithNativeObserver;
|
||||
+import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
import org.chromium.chrome.browser.preferences.ChromePreferenceKeys;
|
||||
import org.chromium.chrome.browser.preferences.ChromeSharedPreferences;
|
||||
+import org.chromium.chrome.browser.flags.cromite.sShowNtpAtStartupAndroid;
|
||||
|
||||
@@ -55,6 +56,18 @@ public class ChromeInactivityTracker
|
||||
/**
|
||||
* Manages pref that can track the delay since the last stop of the tracked activity.
|
||||
@@ -55,6 +57,18 @@ public class ChromeInactivityTracker
|
||||
mLifecycleDispatcher.register(this);
|
||||
}
|
||||
|
||||
@@ -72,8 +82,8 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeInactivit
|
||||
+
|
||||
+ public boolean isNewStartup() {
|
||||
+ return
|
||||
+ ChromeFeatureList.sShowNtpAtStartupAndroid.isEnabled()
|
||||
+ && ChromeSharedPreferences.getInstance().readBoolean(
|
||||
+ sShowNtpAtStartupAndroid.getInstance().isEnabled() &&
|
||||
+ ChromeSharedPreferences.getInstance().readBoolean(
|
||||
+ ChromePreferenceKeys.TABBED_ACTIVITY_IS_STARTUP, false);
|
||||
+ }
|
||||
+
|
||||
@@ -95,7 +105,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedAct
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java
|
||||
--- a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java
|
||||
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java
|
||||
@@ -19,6 +19,7 @@ import org.chromium.base.IntentUtils;
|
||||
@@ -19,9 +19,11 @@ import org.chromium.base.IntentUtils;
|
||||
import org.chromium.base.cached_flags.IntCachedFieldTrialParameter;
|
||||
import org.chromium.base.metrics.RecordHistogram;
|
||||
import org.chromium.chrome.R;
|
||||
@@ -103,10 +113,17 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToC
|
||||
import org.chromium.chrome.browser.ChromeInactivityTracker;
|
||||
import org.chromium.chrome.browser.app.ChromeActivity;
|
||||
import org.chromium.chrome.browser.flags.ChromeFeatureList;
|
||||
@@ -133,6 +134,15 @@ public final class ReturnToChromeUtil {
|
||||
+import org.chromium.chrome.browser.flags.cromite.sShowNtpAtStartupAndroid;
|
||||
import org.chromium.chrome.browser.magic_stack.HomeModulesMetricsUtils;
|
||||
import org.chromium.chrome.browser.ntp.NewTabPage;
|
||||
import org.chromium.chrome.browser.tab.Tab;
|
||||
@@ -133,6 +135,18 @@ public final class ReturnToChromeUtil {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ if (!sShowNtpAtStartupAndroid.getInstance().isEnabled())
|
||||
+ return false;
|
||||
+
|
||||
+ boolean isMainIntentFromLauncherOrRestart =
|
||||
+ IntentUtils.isMainIntentFromLauncher(intent)
|
||||
+ || IntentUtils.safeGetBooleanExtra(
|
||||
@@ -119,7 +136,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToC
|
||||
// Checks whether to show the NTP homepage due to feature flag
|
||||
// HOME_SURFACE_RETURN_TIME_SECONDS.
|
||||
long lastVisibleTimeMs = inactivityTracker.getLastVisibleTimeMs();
|
||||
@@ -243,7 +253,7 @@ public final class ReturnToChromeUtil {
|
||||
@@ -243,7 +257,7 @@ public final class ReturnToChromeUtil {
|
||||
TabModel currentTabModel,
|
||||
TabCreator tabCreator,
|
||||
HomeSurfaceTracker homeSurfaceTracker) {
|
||||
@@ -128,6 +145,55 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToC
|
||||
return false;
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
--- a/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
+++ b/chrome/browser/flags/android/chrome_feature_list.cc
|
||||
@@ -295,6 +295,7 @@ const base::Feature* const kFeaturesExposedToJava[] = {
|
||||
&kReportParentalControlSitesChild,
|
||||
&kSearchInCCT,
|
||||
&kSearchResumptionModuleAndroid,
|
||||
+ &kShowNtpAtStartupAndroid,
|
||||
&kShareCustomActionsInCCT,
|
||||
&kSmallerTabStripTitleLimit,
|
||||
&kSuppressToolbarCaptures,
|
||||
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/sShowNtpAtStartupAndroid.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/sShowNtpAtStartupAndroid.java
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/cromite/sShowNtpAtStartupAndroid.java
|
||||
@@ -0,0 +1,33 @@
|
||||
+/*
|
||||
+ This file is part of Cromite.
|
||||
+
|
||||
+ Cromite is free software: you can redistribute it and/or modify
|
||||
+ it under the terms of the GNU General Public License as published by
|
||||
+ the Free Software Foundation, either version 3 of the License, or
|
||||
+ (at your option) any later version.
|
||||
+
|
||||
+ Cromite is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ GNU General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU General Public License
|
||||
+ along with Cromite. If not, see <https://www.gnu.org/licenses/>.
|
||||
+*/
|
||||
+
|
||||
+package org.chromium.chrome.browser.flags.cromite;
|
||||
+
|
||||
+import org.chromium.base.cached_flags.CachedFlag;
|
||||
+import org.chromium.chrome.browser.flags.ChromeFeatureMap;
|
||||
+
|
||||
+public class sShowNtpAtStartupAndroid {
|
||||
+ private static final CachedFlag sInstance =
|
||||
+ new CachedFlag(ChromeFeatureMap.getInstance(),
|
||||
+ "ShowNtpAtStartupAndroid", false);
|
||||
+
|
||||
+ private sShowNtpAtStartupAndroid() {}
|
||||
+
|
||||
+ public static CachedFlag getInstance() {
|
||||
+ return sInstance;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
--- a/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
+++ b/chrome/browser/preferences/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceKeys.java
|
||||
@@ -171,7 +237,7 @@ diff --git a/chrome/browser/single_tab/android/java/src/org/chromium/chrome/brow
|
||||
super.onPageLoadFinished(tab, url);
|
||||
mPropertyModel.set(TITLE, tab.getTitle());
|
||||
- mPropertyModel.set(URL, getDomainUrl(tab.getUrl()));
|
||||
+ mPropertyModel.set(URL, tab.getUrl().getPossiblyInvalidSpec()));
|
||||
+ mPropertyModel.set(URL, tab.getUrl().getPossiblyInvalidSpec());
|
||||
tab.removeObserver(this);
|
||||
}
|
||||
};
|
||||
@@ -179,7 +245,7 @@ diff --git a/chrome/browser/single_tab/android/java/src/org/chromium/chrome/brow
|
||||
} else {
|
||||
mPropertyModel.set(TITLE, mMostRecentTab.getTitle());
|
||||
- mPropertyModel.set(URL, getDomainUrl(mMostRecentTab.getUrl()));
|
||||
+ mPropertyModel.set(URL, mMostRecentTab.getUrl().getPossiblyInvalidSpec()));
|
||||
+ mPropertyModel.set(URL, mMostRecentTab.getUrl().getPossiblyInvalidSpec());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,11 +263,37 @@ new file mode 100644
|
||||
+ Enable showing a NewTabPage at startup and allows selection of the last open tab
|
||||
+ </message>
|
||||
+</grit-part>
|
||||
diff --git a/cromite_flags/chrome/browser/about_flags_cc/show-ntp-at-startup.inc b/cromite_flags/chrome/browser/about_flags_cc/show-ntp-at-startup.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/about_flags_cc/show-ntp-at-startup.inc
|
||||
@@ -0,0 +1,12 @@
|
||||
+#if BUILDFLAG(IS_ANDROID)
|
||||
+
|
||||
+#ifdef FLAG_SECTION
|
||||
+
|
||||
+ {"enable-show-ntp-at-startup",
|
||||
+ "Show a NewTabPage at startup",
|
||||
+ "Enable showing a NewTabPage at startup after leaving Cromite for a while.", kOsAndroid,
|
||||
+ FEATURE_VALUE_TYPE(chrome::android::kShowNtpAtStartupAndroid)},
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#endif
|
||||
diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/show-ntp-at-startup.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/show-ntp-at-startup.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_cc/show-ntp-at-startup.inc
|
||||
@@ -0,0 +1,2 @@
|
||||
@@ -0,0 +1,5 @@
|
||||
+SET_CROMITE_FEATURE_ENABLED(kStartSurfaceReturnTime);
|
||||
+SET_CROMITE_FEATURE_ENABLED(kShowNtpAtStartupAndroid);
|
||||
+
|
||||
+CROMITE_FEATURE(kShowNtpAtStartupAndroid,
|
||||
+ "ShowNtpAtStartupAndroid",
|
||||
+ base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
diff --git a/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/show-ntp-at-startup.inc b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/show-ntp-at-startup.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
+++ b/cromite_flags/chrome/browser/flags/android/chrome_feature_list_h/show-ntp-at-startup.inc
|
||||
@@ -0,0 +1 @@
|
||||
+BASE_DECLARE_FEATURE(kShowNtpAtStartupAndroid);
|
||||
--
|
||||
|
||||
@@ -20,14 +20,14 @@ Require: Content-settings-infrastructure.patch
|
||||
.../platform/web_content_settings_client.h | 5 +
|
||||
.../blink/renderer/core/frame/local_frame.cc | 13 ---
|
||||
.../blink/renderer/core/frame/local_frame.h | 6 --
|
||||
.../renderer/core/html/image_document.cc | 5 +-
|
||||
.../renderer/core/html/image_document.cc | 9 +-
|
||||
.../core/loader/frame_fetch_context.cc | 12 +--
|
||||
.../core/loader/frame_fetch_context.h | 2 +-
|
||||
third_party/blink/renderer/core/page/page.cc | 5 +-
|
||||
.../platform/loader/fetch/fetch_context.h | 2 +-
|
||||
.../platform/loader/fetch/resource_fetcher.cc | 17 +++-
|
||||
.../platform/loader/fetch/resource_fetcher.h | 2 +
|
||||
21 files changed, 174 insertions(+), 36 deletions(-)
|
||||
21 files changed, 178 insertions(+), 36 deletions(-)
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-hdpi/permission_images.png
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-mdpi/permission_images.png
|
||||
create mode 100644 components/browser_ui/site_settings/android/java/res/drawable-xhdpi/permission_images.png
|
||||
@@ -362,14 +362,18 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/b
|
||||
diff --git a/third_party/blink/renderer/core/html/image_document.cc b/third_party/blink/renderer/core/html/image_document.cc
|
||||
--- a/third_party/blink/renderer/core/html/image_document.cc
|
||||
+++ b/third_party/blink/renderer/core/html/image_document.cc
|
||||
@@ -140,7 +140,10 @@ void ImageDocumentParser::AppendBytes(const char* data, size_t length) {
|
||||
@@ -140,7 +140,14 @@ void ImageDocumentParser::AppendBytes(const char* data, size_t length) {
|
||||
return;
|
||||
|
||||
LocalFrame* frame = GetDocument()->GetFrame();
|
||||
- bool allow_image = frame->ImagesEnabled();
|
||||
+ Settings* settings = frame->GetSettings();
|
||||
+ bool allow_image_renderer = !settings || settings->GetImagesEnabled();
|
||||
+ bool allow_image_content_setting = frame->GetContentSettings()->allow_image;
|
||||
+ bool allow_image_content_setting = false;
|
||||
+ if (auto* client = frame->GetContentSettingsClient()) {
|
||||
+ allow_image_content_setting = client->AllowImage(allow_image_renderer,
|
||||
+ GetDocument()->Url());
|
||||
+ }
|
||||
+ bool allow_image = allow_image_renderer && allow_image_content_setting;
|
||||
if (!allow_image) {
|
||||
auto* client = frame->GetContentSettingsClient();
|
||||
|
||||
@@ -30,9 +30,9 @@ Require: Content-settings-infrastructure.patch
|
||||
.../common/content_settings_mojom_traits.cc | 3 +-
|
||||
.../common/content_settings_mojom_traits.h | 5 +
|
||||
.../content_settings/core/common/pref_names.h | 3 +
|
||||
.../renderer/content_settings_agent_impl.cc | 78 +++++++
|
||||
.../renderer/content_settings_agent_impl.cc | 77 +++++++
|
||||
.../renderer/content_settings_agent_impl.h | 11 +
|
||||
22 files changed, 679 insertions(+), 1 deletion(-)
|
||||
22 files changed, 678 insertions(+), 1 deletion(-)
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/time_zone_select_dialog.xml
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/res/layout/timezoneoverride_site_settings_preference.xml
|
||||
create mode 100755 components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/TimezoneOverrideSiteSettingsPreference.java
|
||||
@@ -839,23 +839,15 @@ diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc
|
||||
#include "components/content_settings/core/common/content_settings.h"
|
||||
#include "components/content_settings/core/common/content_settings.mojom.h"
|
||||
#include "components/content_settings/core/common/content_settings_pattern.h"
|
||||
@@ -368,6 +370,7 @@ bool ContentSettingsAgentImpl::AllowScript(bool enabled_per_settings) {
|
||||
allow = allow || IsAllowlistedForContentSettingsCromite();
|
||||
@@ -169,6 +171,7 @@ void ContentSettingsAgentImpl::DidCommitProvisionalLoad(
|
||||
// correctly detect that a piece of content flipped from "not blocked" to
|
||||
// "blocked".
|
||||
ClearBlockedContentSettings(); // do not remove
|
||||
+ UpdateOverrides();
|
||||
|
||||
cached_script_permissions_[frame] = allow;
|
||||
+ if (allow) UpdateOverrides();
|
||||
return allow;
|
||||
}
|
||||
|
||||
@@ -383,6 +386,7 @@ bool ContentSettingsAgentImpl::AllowScriptFromSource(
|
||||
ContentSettingsType::JAVASCRIPT, script_url, enabled_per_settings);
|
||||
}
|
||||
allow = allow || IsAllowlistedForContentSettingsCromite();
|
||||
+ if (allow) UpdateOverrides();
|
||||
return allow;
|
||||
}
|
||||
|
||||
@@ -480,4 +484,78 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const {
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
if (frame->Parent())
|
||||
@@ -480,4 +483,78 @@ bool ContentSettingsAgentImpl::IsAllowlistedForContentSettingsCromite() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -518,7 +518,7 @@ diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/
|
||||
+ if (with_zoom_factor)
|
||||
+ ratio *= LayoutZoomFactor();
|
||||
+ else
|
||||
+ ratio = page_zoom_factor_;
|
||||
+ ratio = layout_zoom_factor_;
|
||||
return ratio;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,17 +10,17 @@ attacks, so it is better to warn the user of the presence of an
|
||||
unsupported device.
|
||||
you can remove the message by going to chrome://flags/#no-hw-aes-warning
|
||||
---
|
||||
base/base_switches.cc | 2 ++
|
||||
base/base_switches.h | 1 +
|
||||
chrome/BUILD.gn | 3 +++
|
||||
chrome/app/chrome_main_delegate.cc | 10 ++++++++++
|
||||
chrome/app/generated_resources.grd | 4 ++++
|
||||
chrome/browser/ui/startup/bad_flags_prompt.cc | 9 +++++++++
|
||||
.../browser/renderer_host/render_process_host_impl.cc | 1 +
|
||||
.../Warning-message-for-unsupported-hardware-aes.inc | 9 +++++++++
|
||||
.../Warning-message-for-unsupported-hardware-aes.inc | 4 ++++
|
||||
.../Warning-message-for-unsupported-hardware-aes.inc | 1 +
|
||||
10 files changed, 44 insertions(+)
|
||||
base/base_switches.cc | 2 ++
|
||||
base/base_switches.h | 1 +
|
||||
chrome/BUILD.gn | 3 +++
|
||||
chrome/app/chrome_main_delegate.cc | 9 +++++++++
|
||||
chrome/app/generated_resources.grd | 4 ++++
|
||||
chrome/browser/ui/startup/bad_flags_prompt.cc | 9 +++++++++
|
||||
.../browser/renderer_host/render_process_host_impl.cc | 1 +
|
||||
.../Warning-message-for-unsupported-hardware-aes.inc | 9 +++++++++
|
||||
.../Warning-message-for-unsupported-hardware-aes.inc | 4 ++++
|
||||
.../Warning-message-for-unsupported-hardware-aes.inc | 1 +
|
||||
10 files changed, 43 insertions(+)
|
||||
create mode 100644 cromite_flags/chrome/browser/about_flags_cc/Warning-message-for-unsupported-hardware-aes.inc
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_cc/Warning-message-for-unsupported-hardware-aes.inc
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_h/Warning-message-for-unsupported-hardware-aes.inc
|
||||
@@ -81,12 +81,11 @@ diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegat
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include <malloc.h>
|
||||
@@ -1290,6 +1293,13 @@ std::optional<int> ChromeMainDelegate::BasicStartupComplete() {
|
||||
@@ -1290,6 +1293,12 @@ std::optional<int> ChromeMainDelegate::BasicStartupComplete() {
|
||||
return chrome::RESULT_CODE_INVALID_SANDBOX_STATE;
|
||||
#endif
|
||||
|
||||
+if (!command_line.HasSwitch(switches::kProcessType)) {
|
||||
+ crypto::EnsureOpenSSLInit();
|
||||
+ if (EVP_has_aes_hardware() == 0) {
|
||||
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(switches::kNoAESHardware);
|
||||
+ }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -110,7 +110,7 @@ diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegat
|
||||
#include "chrome/browser/buildflags.h"
|
||||
#include "chrome/browser/chrome_content_browser_client.h"
|
||||
#include "chrome/browser/chrome_resource_bundle_helper.h"
|
||||
@@ -1928,7 +1933,7 @@ content::ContentClient* ChromeMainDelegate::CreateContentClient() {
|
||||
@@ -1927,7 +1932,7 @@ content::ContentClient* ChromeMainDelegate::CreateContentClient() {
|
||||
content::ContentBrowserClient*
|
||||
ChromeMainDelegate::CreateContentBrowserClient() {
|
||||
chrome_content_browser_client_ =
|
||||
|
||||
@@ -27,7 +27,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
.../one_google_bar_loader_impl.cc | 3 +-
|
||||
.../new_tab_page/promos/promo_service.cc | 6 +-
|
||||
.../from_gws_page_load_metrics_observer.cc | 6 +-
|
||||
.../page_load_metrics_initialize.cc | 2 -
|
||||
.../page_load_metrics_initialize.cc | 4 -
|
||||
chrome/browser/safe_browsing/BUILD.gn | 1 -
|
||||
chrome/browser/search_engines/BUILD.gn | 1 -
|
||||
.../ui_thread_search_terms_data.cc | 4 -
|
||||
@@ -63,7 +63,7 @@ License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
...gled-chromium-no-special-hosts-domains.inc | 1 +
|
||||
net/base/url_util.cc | 25 +-
|
||||
services/network/network_context.cc | 2 +-
|
||||
56 files changed, 55 insertions(+), 846 deletions(-)
|
||||
56 files changed, 55 insertions(+), 848 deletions(-)
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_cc/ungoogled-chromium-no-special-hosts-domains.inc
|
||||
|
||||
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java
|
||||
@@ -674,15 +674,18 @@ diff --git a/chrome/browser/page_load_metrics/observers/from_gws_page_load_metri
|
||||
diff --git a/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc b/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc
|
||||
--- a/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc
|
||||
+++ b/chrome/browser/page_load_metrics/page_load_metrics_initialize.cc
|
||||
@@ -169,8 +169,6 @@ void PageLoadMetricsEmbedder::RegisterEmbedderObservers(
|
||||
@@ -169,11 +169,7 @@ void PageLoadMetricsEmbedder::RegisterEmbedderObservers(
|
||||
tracker->AddObserver(std::make_unique<AMPPageLoadMetricsObserver>());
|
||||
tracker->AddObserver(std::make_unique<JavascriptFrameworksUkmObserver>());
|
||||
tracker->AddObserver(std::make_unique<SchemePageLoadMetricsObserver>());
|
||||
- tracker->AddObserver(std::make_unique<FromGWSPageLoadMetricsObserver>());
|
||||
- tracker->AddObserver(std::make_unique<GWSPageLoadMetricsObserver>());
|
||||
tracker->AddObserver(std::make_unique<AbandonedPageLoadMetricsObserver>());
|
||||
- tracker->AddObserver(
|
||||
- std::make_unique<GWSAbandonedPageLoadMetricsObserver>());
|
||||
tracker->AddObserver(std::make_unique<ForegroundDurationUKMObserver>());
|
||||
tracker->AddObserver(
|
||||
std::make_unique<GWSAbandonedPageLoadMetricsObserver>());
|
||||
std::make_unique<DocumentWritePageLoadMetricsObserver>());
|
||||
diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsing/BUILD.gn
|
||||
--- a/chrome/browser/safe_browsing/BUILD.gn
|
||||
+++ b/chrome/browser/safe_browsing/BUILD.gn
|
||||
|
||||
Reference in New Issue
Block a user