mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 00:14:20 +09:00
@@ -1,5 +1,6 @@
|
||||
inox-patchset/fix-crash-in-is_cfi-true-builds-with-unbundled-ICU.patch
|
||||
inox-patchset/fix-frame-buttons-rendering-too-large-when-using-OSX.patch
|
||||
inox-patchset/chromium-arflags.patch
|
||||
inox-patchset/chromium-clang-compiler-flags.patch
|
||||
inox-patchset/chromium-enable_widevine.patch
|
||||
inox-patchset/chromium-exclude_unwind_tables.patch
|
||||
inox-patchset/chromium-ffmpeg-r1.patch
|
||||
inox-patchset/chromium-skia-harmony.patch
|
||||
@@ -33,13 +34,10 @@ debian/disable/welcome-page.patch
|
||||
debian/disable/google-api-warning.patch
|
||||
debian/disable/device-notifications.patch
|
||||
debian/fixes/mojo.patch
|
||||
debian/fixes/optional.patch
|
||||
debian/fixes/optimize.patch
|
||||
debian/fixes/ps-print.patch
|
||||
debian/fixes/inspector.patch
|
||||
debian/fixes/gpu-timeout.patch
|
||||
debian/fixes/duplicate-name.patch
|
||||
debian/fixes/overloaded-call.patch
|
||||
debian/fixes/incomplete-types.patch
|
||||
debian/fixes/ambiguous-aliases.patch
|
||||
debian/fixes/widevine-revision.patch
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
[version]
|
||||
chromium_version = 66.0.3359.181
|
||||
chromium_version = 67.0.3396.48
|
||||
release_revision = 1
|
||||
|
||||
@@ -3,12 +3,12 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/content/shell/test_runner/BUILD.gn
|
||||
+++ b/content/shell/test_runner/BUILD.gn
|
||||
@@ -204,7 +204,7 @@ group("resources") {
|
||||
@@ -203,7 +203,7 @@ group("resources") {
|
||||
deps += [ ":copy_android_fonts_config" ]
|
||||
data_deps += [ ":copy_android_fonts_config" ]
|
||||
}
|
||||
- if (is_android || is_linux || is_fuchsia) {
|
||||
+ if (false) {
|
||||
deps += [ "//third_party/content_shell_fonts" ]
|
||||
data_deps += [ "//third_party/content_shell_fonts" ]
|
||||
deps += [ "//third_party/test_fonts" ]
|
||||
data_deps += [ "//third_party/test_fonts" ]
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
|
||||
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
|
||||
@@ -904,8 +904,6 @@ void StartupBrowserCreatorImpl::AddInfoB
|
||||
chrome::ShowBadFlagsPrompt(browser);
|
||||
InfoBarService* infobar_service = InfoBarService::FromWebContents(
|
||||
browser->tab_strip_model()->GetActiveWebContents());
|
||||
@@ -900,8 +900,6 @@ void StartupBrowserCreatorImpl::AddInfoB
|
||||
chrome::ShowBadFlagsPrompt(web_contents);
|
||||
InfoBarService* infobar_service =
|
||||
InfoBarService::FromWebContents(web_contents);
|
||||
- if (!google_apis::HasKeysConfigured())
|
||||
- GoogleApiKeysInfoBarDelegate::Create(infobar_service);
|
||||
if (ObsoleteSystem::IsObsoleteNowOrSoon()) {
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
description: renamed routine collides with WTFString.h, revert to chromium 64 name
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
|
||||
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
|
||||
@@ -106,7 +106,7 @@ class MODULES_EXPORT IDBKey {
|
||||
return binary_;
|
||||
}
|
||||
|
||||
- const String& String() const {
|
||||
+ const String& GetString() const {
|
||||
DCHECK_EQ(type_, kStringType);
|
||||
return string_;
|
||||
}
|
||||
--- a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
|
||||
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
|
||||
@@ -65,7 +65,7 @@ class MODULES_EXPORT IDBKeyPath {
|
||||
return array_;
|
||||
}
|
||||
|
||||
- const String& String() const {
|
||||
+ const String& GetString() const {
|
||||
DCHECK_EQ(type_, kStringType);
|
||||
return string_;
|
||||
}
|
||||
--- a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
|
||||
+++ b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
|
||||
@@ -68,7 +68,7 @@ v8::Local<v8::Value> ToV8(const IDBKeyPa
|
||||
case IDBKeyPath::kNullType:
|
||||
return v8::Null(isolate);
|
||||
case IDBKeyPath::kStringType:
|
||||
- return V8String(isolate, value.String());
|
||||
+ return V8String(isolate, value.GetString());
|
||||
case IDBKeyPath::kArrayType:
|
||||
return ToV8(value.Array(), creation_context, isolate);
|
||||
}
|
||||
@@ -97,7 +97,7 @@ v8::Local<v8::Value> ToV8(const IDBKey*
|
||||
case IDBKey::kNumberType:
|
||||
return v8::Number::New(isolate, key->Number());
|
||||
case IDBKey::kStringType:
|
||||
- return V8String(isolate, key->String());
|
||||
+ return V8String(isolate, key->GetString());
|
||||
case IDBKey::kBinaryType:
|
||||
// https://w3c.github.io/IndexedDB/#convert-a-value-to-a-key
|
||||
return ToV8(DOMArrayBuffer::Create(key->Binary()), creation_context,
|
||||
@@ -375,7 +375,7 @@ static std::unique_ptr<IDBKey> CreateIDB
|
||||
}
|
||||
|
||||
DCHECK_EQ(key_path.GetType(), IDBKeyPath::kStringType);
|
||||
- return CreateIDBKeyFromValueAndKeyPath(isolate, value, key_path.String(),
|
||||
+ return CreateIDBKeyFromValueAndKeyPath(isolate, value, key_path.GetString(),
|
||||
exception_state);
|
||||
}
|
||||
|
||||
@@ -479,7 +479,7 @@ bool InjectV8KeyIntoV8Value(v8::Isolate*
|
||||
DCHECK(isolate->InContext());
|
||||
|
||||
DCHECK_EQ(key_path.GetType(), IDBKeyPath::kStringType);
|
||||
- Vector<String> key_path_elements = ParseKeyPath(key_path.String());
|
||||
+ Vector<String> key_path_elements = ParseKeyPath(key_path.GetString());
|
||||
|
||||
// The conbination of a key generator and an empty key path is forbidden by
|
||||
// spec.
|
||||
@@ -565,7 +565,7 @@ bool CanInjectIDBKeyIntoScriptValue(v8::
|
||||
const IDBKeyPath& key_path) {
|
||||
IDB_TRACE("canInjectIDBKeyIntoScriptValue");
|
||||
DCHECK_EQ(key_path.GetType(), IDBKeyPath::kStringType);
|
||||
- Vector<String> key_path_elements = ParseKeyPath(key_path.String());
|
||||
+ Vector<String> key_path_elements = ParseKeyPath(key_path.GetString());
|
||||
|
||||
if (!key_path_elements.size())
|
||||
return false;
|
||||
--- a/third_party/WebKit/Source/modules/exported/WebIDBKey.cpp
|
||||
+++ b/third_party/WebKit/Source/modules/exported/WebIDBKey.cpp
|
||||
@@ -56,7 +56,7 @@ WebData WebIDBKeyView::Binary() const {
|
||||
}
|
||||
|
||||
WebString WebIDBKeyView::String() const {
|
||||
- return private_->String();
|
||||
+ return private_->GetString();
|
||||
}
|
||||
|
||||
double WebIDBKeyView::Date() const {
|
||||
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
|
||||
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
|
||||
@@ -297,7 +297,7 @@ IDBObjectStore* IDBDatabase::createObjec
|
||||
}
|
||||
|
||||
if (auto_increment && ((key_path.GetType() == IDBKeyPath::kStringType &&
|
||||
- key_path.String().IsEmpty()) ||
|
||||
+ key_path.GetString().IsEmpty()) ||
|
||||
key_path.GetType() == IDBKeyPath::kArrayType)) {
|
||||
exception_state.ThrowDOMException(
|
||||
kInvalidAccessError,
|
||||
--- a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
|
||||
+++ b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
|
||||
@@ -399,7 +399,7 @@ static std::unique_ptr<KeyPath> KeyPathF
|
||||
case IDBKeyPath::kStringType:
|
||||
key_path = KeyPath::create()
|
||||
.setType(KeyPath::TypeEnum::String)
|
||||
- .setString(idb_key_path.String())
|
||||
+ .setString(idb_key_path.GetString())
|
||||
.build();
|
||||
break;
|
||||
case IDBKeyPath::kArrayType: {
|
||||
@@ -1,18 +1,6 @@
|
||||
description: gcc requires complete definition when types are used in unique_ptr
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/services/preferences/tracked/pref_hash_filter.h
|
||||
+++ b/services/preferences/tracked/pref_hash_filter.h
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "services/preferences/tracked/hash_store_contents.h"
|
||||
#include "services/preferences/tracked/interceptable_pref_filter.h"
|
||||
#include "services/preferences/tracked/tracked_preference.h"
|
||||
+#include "services/preferences/tracked/pref_hash_store.h"
|
||||
|
||||
-class PrefHashStore;
|
||||
class PrefService;
|
||||
|
||||
namespace base {
|
||||
--- a/components/policy/core/browser/browser_policy_connector_base.h
|
||||
+++ b/components/policy/core/browser/browser_policy_connector_base.h
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
@@ -3,7 +3,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/content/shell/BUILD.gn
|
||||
+++ b/content/shell/BUILD.gn
|
||||
@@ -92,8 +92,6 @@ static_library("content_shell_lib") {
|
||||
@@ -101,8 +101,6 @@ static_library("content_shell_lib") {
|
||||
"browser/layout_test/layout_test_push_messaging_service.h",
|
||||
"browser/layout_test/layout_test_url_request_context_getter.cc",
|
||||
"browser/layout_test/layout_test_url_request_context_getter.h",
|
||||
@@ -12,7 +12,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
"browser/layout_test/secondary_test_window_observer.cc",
|
||||
"browser/layout_test/secondary_test_window_observer.h",
|
||||
"browser/layout_test/test_info_extractor.cc",
|
||||
@@ -244,9 +242,7 @@ static_library("content_shell_lib") {
|
||||
@@ -255,9 +253,7 @@ static_library("content_shell_lib") {
|
||||
"//content/public/common",
|
||||
"//content/public/common:service_names",
|
||||
"//content/shell/test_runner:test_runner",
|
||||
@@ -24,7 +24,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
"//device/bluetooth:fake_bluetooth",
|
||||
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
|
||||
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
|
||||
@@ -18,7 +18,6 @@
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "content/shell/browser/layout_test/layout_test_browser_main_parts.h"
|
||||
#include "content/shell/browser/layout_test/layout_test_message_filter.h"
|
||||
#include "content/shell/browser/layout_test/layout_test_notification_manager.h"
|
||||
@@ -32,7 +32,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
#include "content/shell/browser/shell_browser_context.h"
|
||||
#include "content/shell/common/layout_test/layout_test_switches.h"
|
||||
#include "content/shell/common/shell_messages.h"
|
||||
@@ -31,11 +30,6 @@ namespace {
|
||||
@@ -36,11 +35,6 @@ namespace {
|
||||
|
||||
LayoutTestContentBrowserClient* g_layout_test_browser_client;
|
||||
|
||||
@@ -41,22 +41,22 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
- MojoLayoutTestHelper::Create(std::move(request));
|
||||
-}
|
||||
-
|
||||
} // namespace
|
||||
|
||||
LayoutTestContentBrowserClient::LayoutTestContentBrowserClient() {
|
||||
@@ -98,7 +92,6 @@ void LayoutTestContentBrowserClient::Exp
|
||||
|
||||
registry->AddInterface(base::Bind(&bluetooth::FakeBluetooth::Create),
|
||||
ui_task_runner);
|
||||
- registry->AddInterface(base::Bind(&MojoLayoutTestHelper::Create));
|
||||
class WebPackageInternalsImpl : public blink::test::mojom::WebPackageInternals {
|
||||
public:
|
||||
explicit WebPackageInternalsImpl(WebPackageContext* web_package_context)
|
||||
@@ -148,7 +142,6 @@ void LayoutTestContentBrowserClient::Exp
|
||||
&WebPackageInternalsImpl::Create,
|
||||
base::Unretained(
|
||||
render_process_host->GetStoragePartition()->GetWebPackageContext())));
|
||||
- registry->AddInterface(base::BindRepeating(&MojoLayoutTestHelper::Create));
|
||||
}
|
||||
|
||||
void LayoutTestContentBrowserClient::OverrideWebkitPrefs(
|
||||
@@ -186,7 +179,6 @@ bool LayoutTestContentBrowserClient::Can
|
||||
@@ -236,7 +229,6 @@ bool LayoutTestContentBrowserClient::Can
|
||||
void LayoutTestContentBrowserClient::ExposeInterfacesToFrame(
|
||||
service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>*
|
||||
registry) {
|
||||
- registry->AddInterface(base::Bind(&BindLayoutTestHelper));
|
||||
}
|
||||
|
||||
ResourceDispatcherHostLoginDelegate*
|
||||
scoped_refptr<LoginDelegate>
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
description: Optional as of chromium 66 excludes copy construction from a type
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/content/browser/appcache/appcache_request_handler.cc
|
||||
+++ b/content/browser/appcache/appcache_request_handler.cc
|
||||
@@ -639,7 +639,7 @@ AppCacheRequestHandler::MaybeCreateSubre
|
||||
|
||||
SubresourceLoaderParams params;
|
||||
params.loader_factory_info = factory_ptr.PassInterface();
|
||||
- return params;
|
||||
+ return std::move(params);
|
||||
}
|
||||
|
||||
void AppCacheRequestHandler::MaybeCreateSubresourceLoader(
|
||||
--- a/content/browser/service_worker/service_worker_controllee_request_handler.cc
|
||||
+++ b/content/browser/service_worker/service_worker_controllee_request_handler.cc
|
||||
@@ -271,7 +271,7 @@ ServiceWorkerControlleeRequestHandler::M
|
||||
controller_info->object_info = provider_host_->GetOrCreateServiceWorkerHandle(
|
||||
provider_host_->controller());
|
||||
params.controller_service_worker_info = std::move(controller_info);
|
||||
- return params;
|
||||
+ return std::move(params);
|
||||
}
|
||||
|
||||
void ServiceWorkerControlleeRequestHandler::PrepareForMainResource(
|
||||
--- a/device/fido/device_response_converter.cc
|
||||
+++ b/device/fido/device_response_converter.cc
|
||||
@@ -121,7 +121,7 @@ base::Optional<AuthenticatorGetAssertion
|
||||
response.SetNumCredentials(it->second.GetUnsigned());
|
||||
}
|
||||
|
||||
- return response;
|
||||
+ return std::move(response);
|
||||
}
|
||||
|
||||
base::Optional<AuthenticatorGetInfoResponse> ReadCTAPGetInfoResponse(
|
||||
@@ -241,7 +241,7 @@ base::Optional<AuthenticatorGetInfoRespo
|
||||
response.SetPinProtocols(std::move(supported_pin_protocols));
|
||||
}
|
||||
|
||||
- return response;
|
||||
+ return std::move(response);
|
||||
}
|
||||
|
||||
} // namespace device
|
||||
--- a/cc/raster/playback_image_provider.cc
|
||||
+++ b/cc/raster/playback_image_provider.cc
|
||||
@@ -70,7 +70,6 @@ PlaybackImageProvider::GetDecodedDrawIma
|
||||
}
|
||||
|
||||
PlaybackImageProvider::Settings::Settings() = default;
|
||||
-PlaybackImageProvider::Settings::Settings(const Settings& other) = default;
|
||||
PlaybackImageProvider::Settings::~Settings() = default;
|
||||
|
||||
} // namespace cc
|
||||
--- a/cc/raster/playback_image_provider.h
|
||||
+++ b/cc/raster/playback_image_provider.h
|
||||
@@ -20,7 +20,6 @@ class CC_EXPORT PlaybackImageProvider :
|
||||
public:
|
||||
struct CC_EXPORT Settings {
|
||||
Settings();
|
||||
- Settings(const Settings& other);
|
||||
~Settings();
|
||||
|
||||
// The set of image ids to skip during raster.
|
||||
@@ -1,14 +0,0 @@
|
||||
description: explicitly construct a vector
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/chrome/browser/supervised_user/supervised_user_url_filter.cc
|
||||
+++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc
|
||||
@@ -368,7 +368,7 @@ SupervisedUserURLFilter::GetFilteringBeh
|
||||
|
||||
// Allow navigations to whitelisted origins (currently families.google.com).
|
||||
static const base::NoDestructor<base::flat_set<GURL>> kWhitelistedOrigins(
|
||||
- {GURL(kFamiliesUrl).GetOrigin()});
|
||||
+ std::vector<GURL>({GURL(kFamiliesUrl).GetOrigin()}));
|
||||
if (base::ContainsKey(*kWhitelistedOrigins, effective_url.GetOrigin()))
|
||||
return ALLOW;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/third_party/skia/src/jumper/SkJumper_stages.cpp
|
||||
+++ b/third_party/skia/src/jumper/SkJumper_stages.cpp
|
||||
@@ -666,7 +666,7 @@ SI F approx_powf(F x, F y) {
|
||||
--- a/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
+++ b/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
@@ -653,7 +653,7 @@ SI F approx_powf(F x, F y) {
|
||||
}
|
||||
|
||||
SI F from_half(U16 h) {
|
||||
@@ -9,7 +9,7 @@
|
||||
return vcvt_f32_f16(h);
|
||||
|
||||
#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
|
||||
@@ -686,7 +686,7 @@ SI F from_half(U16 h) {
|
||||
@@ -673,7 +673,7 @@ SI F from_half(U16 h) {
|
||||
}
|
||||
|
||||
SI U16 to_half(F f) {
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
description: backwards compatibility for older versions of icu
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/v8/src/runtime/runtime-intl.cc
|
||||
+++ b/v8/src/runtime/runtime-intl.cc
|
||||
@@ -628,7 +628,11 @@ RUNTIME_FUNCTION(Runtime_PluralRulesSele
|
||||
return *isolate->factory()
|
||||
->NewStringFromTwoByte(Vector<const uint16_t>(
|
||||
reinterpret_cast<const uint16_t*>(
|
||||
+#if U_ICU_VERSION_MAJOR_NUM >= 59
|
||||
icu::toUCharPtr(result.getBuffer())),
|
||||
+#else
|
||||
+ result.getBuffer()),
|
||||
+#endif
|
||||
result.length()))
|
||||
.ToHandleChecked();
|
||||
}
|
||||
--- a/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
|
||||
+++ b/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -11,7 +11,6 @@ import("//build/config/ui.gni")
|
||||
import("//net/features.gni")
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
-import("//third_party/icu/config.gni")
|
||||
import("//third_party/protobuf/proto_library.gni")
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
import("//url/features.gni")
|
||||
--- a/third_party/blink/renderer/platform/graphics/logging_canvas.cc
|
||||
+++ b/third_party/blink/renderer/platform/graphics/logging_canvas.cc
|
||||
@@ -531,8 +531,12 @@ String StringForUTF32LEText(const void*
|
||||
utf16 = icu::UnicodeString::fromUTF32(reinterpret_cast<const UChar32*>(text),
|
||||
static_cast<int32_t>(byte_length));
|
||||
@@ -30,23 +26,3 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
}
|
||||
|
||||
String StringForText(const void* text,
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -11,7 +11,6 @@ import("//build/config/ui.gni")
|
||||
import("//net/features.gni")
|
||||
import("//testing/libfuzzer/fuzzer_test.gni")
|
||||
import("//testing/test.gni")
|
||||
-import("//third_party/icu/config.gni")
|
||||
import("//third_party/protobuf/proto_library.gni")
|
||||
import("//tools/grit/grit_rule.gni")
|
||||
import("//url/features.gni")
|
||||
--- a/v8/gni/isolate.gni
|
||||
+++ b/v8/gni/isolate.gni
|
||||
@@ -3,7 +3,6 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
-import("//third_party/icu/config.gni")
|
||||
import("v8.gni")
|
||||
|
||||
declare_args() {
|
||||
|
||||
@@ -3,7 +3,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/third_party/pdfium/third_party/BUILD.gn
|
||||
+++ b/third_party/pdfium/third_party/BUILD.gn
|
||||
@@ -368,38 +368,11 @@ config("fx_libopenjpeg_warnings") {
|
||||
@@ -366,39 +366,11 @@ config("fx_libopenjpeg_warnings") {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
- configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
- configs += [
|
||||
- "//build/config/compiler:no_chromium_code",
|
||||
- "//build/config/sanitizers:cfi_icall_generalize_pointers",
|
||||
- ":pdfium_third_party_config",
|
||||
-
|
||||
- # Must be after no_chromium_code for warning flags to be ordered correctly.
|
||||
|
||||
@@ -3,16 +3,16 @@ author: chromium 65 authors
|
||||
|
||||
--- a/third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
|
||||
+++ b/third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
|
||||
@@ -716,10 +716,8 @@ int VP9EncoderImpl::GetEncodedLayerFrame
|
||||
encoded_image_.content_type_ = (codec_.mode == kScreensharing)
|
||||
? VideoContentType::SCREENSHARE
|
||||
: VideoContentType::UNSPECIFIED;
|
||||
- encoded_image_._encodedHeight =
|
||||
- pkt->data.frame.height[layer_id.spatial_layer_id];
|
||||
- encoded_image_._encodedWidth =
|
||||
- pkt->data.frame.width[layer_id.spatial_layer_id];
|
||||
+ encoded_image_._encodedHeight = raw_->d_h;
|
||||
+ encoded_image_._encodedWidth = raw_->d_w;
|
||||
encoded_image_.timing_.flags = TimingFrameFlags::kInvalid;
|
||||
int qp = -1;
|
||||
vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp);
|
||||
@@ -723,10 +723,8 @@ int VP9EncoderImpl::GetEncodedLayerFrame
|
||||
encoded_image_.content_type_ = (codec_.mode == kScreensharing)
|
||||
? VideoContentType::SCREENSHARE
|
||||
: VideoContentType::UNSPECIFIED;
|
||||
- encoded_image_._encodedHeight =
|
||||
- pkt->data.frame.height[layer_id.spatial_layer_id];
|
||||
- encoded_image_._encodedWidth =
|
||||
- pkt->data.frame.width[layer_id.spatial_layer_id];
|
||||
+ encoded_image_._encodedHeight = raw_->d_h;
|
||||
+ encoded_image_._encodedWidth = raw_->d_w;
|
||||
encoded_image_.timing_.flags = TimingFrameFlags::kInvalid;
|
||||
int qp = -1;
|
||||
vpx_codec_control(encoder_, VP8E_GET_LAST_QUANTIZER, &qp);
|
||||
|
||||
@@ -3,7 +3,7 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/cc/layers/surface_layer_impl.cc
|
||||
+++ b/cc/layers/surface_layer_impl.cc
|
||||
@@ -118,7 +118,7 @@ viz::SurfaceDrawQuad* SurfaceLayerImpl::
|
||||
@@ -131,7 +131,7 @@ viz::SurfaceDrawQuad* SurfaceLayerImpl::
|
||||
// allocate a new SharedQuadState. Assign the new SharedQuadState to
|
||||
// *|common_shared_quad_state| so that it may be reused by another emitted
|
||||
// viz::SurfaceDrawQuad.
|
||||
@@ -12,16 +12,3 @@ author: Michael Gilbert <mgilbert@debian.org>
|
||||
shared_quad_state = render_pass->CreateAndAppendSharedQuadState();
|
||||
|
||||
PopulateScaledSharedQuadState(shared_quad_state, device_scale_factor,
|
||||
--- a/chrome/browser/ui/libgtkui/settings_provider_gsettings.cc
|
||||
+++ b/chrome/browser/ui/libgtkui/settings_provider_gsettings.cc
|
||||
@@ -43,8 +43,8 @@ SettingsProviderGSettings::SettingsProvi
|
||||
const gchar* settings_schema =
|
||||
base::nix::GetDesktopEnvironment(env.get()) ==
|
||||
base::nix::DESKTOP_ENVIRONMENT_CINNAMON
|
||||
- ? settings_schema = kCinnamonPreferencesSchema
|
||||
- : settings_schema = kGnomePreferencesSchema;
|
||||
+ ? kCinnamonPreferencesSchema
|
||||
+ : kGnomePreferencesSchema;
|
||||
|
||||
if (!g_settings_schema_source_lookup(g_settings_schema_source_get_default(),
|
||||
settings_schema, FALSE) ||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -653,30 +653,6 @@ void SetApplicationLocaleOnIOThread(cons
|
||||
@@ -710,30 +710,6 @@ void SetApplicationLocaleOnIOThread(cons
|
||||
g_io_thread_application_locale.Get() = locale;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#if defined(OS_ANDROID)
|
||||
float GetDeviceScaleAdjustment() {
|
||||
static const float kMinFSM = 1.05f;
|
||||
@@ -1739,7 +1715,7 @@ void ChromeContentBrowserClient::AppendE
|
||||
@@ -1890,7 +1866,7 @@ void ChromeContentBrowserClient::AppendE
|
||||
// Disable client-side phishing detection in the renderer if it is
|
||||
// disabled in the Profile preferences or the browser process.
|
||||
if (!prefs->GetBoolean(prefs::kSafeBrowsingEnabled) ||
|
||||
@@ -40,7 +40,7 @@
|
||||
command_line->AppendSwitch(
|
||||
switches::kDisableClientSidePhishingDetection);
|
||||
}
|
||||
@@ -2331,7 +2307,7 @@ void ChromeContentBrowserClient::AllowCe
|
||||
@@ -2489,7 +2465,7 @@ void ChromeContentBrowserClient::AllowCe
|
||||
SSLErrorHandler::HandleSSLError(
|
||||
web_contents, cert_error, ssl_info, request_url,
|
||||
expired_previous_decision,
|
||||
@@ -49,7 +49,7 @@
|
||||
callback, SSLErrorHandler::BlockingPageReadyCallback());
|
||||
}
|
||||
|
||||
@@ -2562,8 +2538,6 @@ bool ChromeContentBrowserClient::CanCrea
|
||||
@@ -2720,8 +2696,6 @@ bool ChromeContentBrowserClient::CanCrea
|
||||
void ChromeContentBrowserClient::ResourceDispatcherHostCreated() {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
for (size_t i = 0; i < extra_parts_.size(); ++i)
|
||||
extra_parts_[i]->ResourceDispatcherHostCreated();
|
||||
|
||||
@@ -3523,7 +3497,7 @@ ChromeContentBrowserClient::CreateThrott
|
||||
@@ -3677,7 +3651,7 @@ ChromeContentBrowserClient::CreateThrott
|
||||
switches::kCommittedInterstitials)) {
|
||||
throttles.push_back(std::make_unique<SSLErrorNavigationThrottle>(
|
||||
handle,
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
--- a/chrome/browser/profiles/profile_impl.cc
|
||||
+++ b/chrome/browser/profiles/profile_impl.cc
|
||||
@@ -488,18 +488,6 @@ ProfileImpl::ProfileImpl(
|
||||
@@ -491,18 +491,6 @@ ProfileImpl::ProfileImpl(
|
||||
create_mode == CREATE_MODE_SYNCHRONOUS);
|
||||
#endif
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
content::BrowserContext::Initialize(this, path_);
|
||||
|
||||
{
|
||||
@@ -508,7 +496,7 @@ ProfileImpl::ProfileImpl(
|
||||
@@ -511,7 +499,7 @@ ProfileImpl::ProfileImpl(
|
||||
->CreateDelegate();
|
||||
delegate->InitPrefRegistry(pref_registry_.get());
|
||||
prefs_ = chrome_prefs::CreateProfilePrefs(
|
||||
@@ -99,7 +99,7 @@
|
||||
GetIOTaskRunner(), std::move(delegate));
|
||||
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
|
||||
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
|
||||
@@ -440,8 +440,7 @@ void LogCommittedPreviewsDecision(
|
||||
@@ -347,8 +347,7 @@ void LogCommittedPreviewsDecision(
|
||||
} // namespace
|
||||
|
||||
ChromeResourceDispatcherHostDelegate::ChromeResourceDispatcherHostDelegate()
|
||||
@@ -109,7 +109,7 @@
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
, user_script_listener_(new extensions::UserScriptListener())
|
||||
#endif
|
||||
@@ -491,8 +490,6 @@ void ChromeResourceDispatcherHostDelegat
|
||||
@@ -398,8 +397,6 @@ void ChromeResourceDispatcherHostDelegat
|
||||
content::AppCacheService* appcache_service,
|
||||
ResourceType resource_type,
|
||||
std::vector<std::unique_ptr<content::ResourceThrottle>>* throttles) {
|
||||
@@ -118,7 +118,7 @@
|
||||
ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
|
||||
client_hints::RequestBeginning(request, io_data->GetCookieSettings());
|
||||
|
||||
@@ -659,7 +656,7 @@ void ChromeResourceDispatcherHostDelegat
|
||||
@@ -533,7 +530,7 @@ void ChromeResourceDispatcherHostDelegat
|
||||
content::ResourceThrottle* first_throttle = NULL;
|
||||
#if defined(OS_ANDROID)
|
||||
first_throttle = DataReductionProxyResourceThrottle::MaybeCreate(
|
||||
@@ -127,7 +127,7 @@
|
||||
#endif // defined(OS_ANDROID)
|
||||
|
||||
#if defined(SAFE_BROWSING_DB_LOCAL) || defined(SAFE_BROWSING_DB_REMOTE)
|
||||
@@ -672,7 +669,7 @@ void ChromeResourceDispatcherHostDelegat
|
||||
@@ -546,7 +543,7 @@ void ChromeResourceDispatcherHostDelegat
|
||||
|
||||
if (!url_loader_throttle_used) {
|
||||
first_throttle = MaybeCreateSafeBrowsingResourceThrottle(
|
||||
@@ -272,7 +272,7 @@
|
||||
} else {
|
||||
--- a/chrome/browser/extensions/blacklist_state_fetcher.cc
|
||||
+++ b/chrome/browser/extensions/blacklist_state_fetcher.cc
|
||||
@@ -32,10 +32,10 @@ BlacklistStateFetcher::~BlacklistStateFe
|
||||
@@ -31,10 +31,10 @@ BlacklistStateFetcher::~BlacklistStateFe
|
||||
void BlacklistStateFetcher::Request(const std::string& id,
|
||||
const RequestCallback& callback) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
@@ -287,25 +287,23 @@
|
||||
} else {
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(callback, BLACKLISTED_UNKNOWN));
|
||||
@@ -48,11 +48,11 @@ void BlacklistStateFetcher::Request(cons
|
||||
@@ -47,10 +47,10 @@ void BlacklistStateFetcher::Request(cons
|
||||
if (request_already_sent)
|
||||
return;
|
||||
|
||||
- if (!url_request_context_getter_ && g_browser_process &&
|
||||
- g_browser_process->safe_browsing_service()) {
|
||||
- url_request_context_getter_ =
|
||||
- g_browser_process->safe_browsing_service()->url_request_context();
|
||||
- if (g_browser_process && g_browser_process->safe_browsing_service()) {
|
||||
- url_loader_factory_ =
|
||||
- g_browser_process->safe_browsing_service()->GetURLLoaderFactory();
|
||||
- }
|
||||
+ //if (!url_request_context_getter_ && g_browser_process &&
|
||||
+ // g_browser_process->safe_browsing_service()) {
|
||||
+ // url_request_context_getter_ =
|
||||
+ // g_browser_process->safe_browsing_service()->url_request_context();
|
||||
+ //if (g_browser_process && g_browser_process->safe_browsing_service()) {
|
||||
+ // url_loader_factory_ =
|
||||
+ // g_browser_process->safe_browsing_service()->GetURLLoaderFactory();
|
||||
+ //}
|
||||
|
||||
SendRequest(id);
|
||||
}
|
||||
@@ -108,11 +108,11 @@ void BlacklistStateFetcher::SendRequest(
|
||||
fetcher->Start();
|
||||
@@ -110,13 +110,14 @@ void BlacklistStateFetcher::SendRequest(
|
||||
base::Unretained(this), fetcher));
|
||||
}
|
||||
|
||||
-void BlacklistStateFetcher::SetSafeBrowsingConfig(
|
||||
@@ -319,17 +317,12 @@
|
||||
+// new safe_browsing::SafeBrowsingProtocolConfig(config));
|
||||
+//}
|
||||
|
||||
void BlacklistStateFetcher::SetURLRequestContextForTest(
|
||||
net::URLRequestContextGetter* request_context) {
|
||||
@@ -120,6 +120,7 @@ void BlacklistStateFetcher::SetURLReques
|
||||
}
|
||||
|
||||
GURL BlacklistStateFetcher::RequestUrl() const {
|
||||
+ /*
|
||||
std::string url = base::StringPrintf(
|
||||
"%s/%s?client=%s&appver=%s&pver=2.2",
|
||||
safe_browsing_config_->url_prefix.c_str(),
|
||||
@@ -132,6 +133,8 @@ GURL BlacklistStateFetcher::RequestUrl()
|
||||
@@ -129,6 +130,8 @@ GURL BlacklistStateFetcher::RequestUrl()
|
||||
net::EscapeQueryParamValue(api_key, true).c_str());
|
||||
}
|
||||
return GURL(url);
|
||||
@@ -337,10 +330,10 @@
|
||||
+ return GURL();
|
||||
}
|
||||
|
||||
void BlacklistStateFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
|
||||
void BlacklistStateFetcher::OnURLLoaderComplete(
|
||||
--- a/chrome/browser/extensions/blacklist_state_fetcher.h
|
||||
+++ b/chrome/browser/extensions/blacklist_state_fetcher.h
|
||||
@@ -34,8 +34,8 @@ class BlacklistStateFetcher : public net
|
||||
@@ -34,8 +34,8 @@ class BlacklistStateFetcher {
|
||||
|
||||
virtual void Request(const std::string& id, const RequestCallback& callback);
|
||||
|
||||
@@ -349,22 +342,22 @@
|
||||
+ //void SetSafeBrowsingConfig(
|
||||
+ // const safe_browsing::SafeBrowsingProtocolConfig& config);
|
||||
|
||||
void SetURLRequestContextForTest(
|
||||
net::URLRequestContextGetter* request_context);
|
||||
@@ -54,8 +54,8 @@ class BlacklistStateFetcher : public net
|
||||
// ID for URLFetchers for testing.
|
||||
int url_fetcher_id_;
|
||||
protected:
|
||||
void OnURLLoaderComplete(network::SimpleURLLoader* url_loader,
|
||||
@@ -55,8 +55,8 @@ class BlacklistStateFetcher {
|
||||
|
||||
void SendRequest(const std::string& id);
|
||||
|
||||
- std::unique_ptr<safe_browsing::SafeBrowsingProtocolConfig>
|
||||
- safe_browsing_config_;
|
||||
+ //std::unique_ptr<safe_browsing::SafeBrowsingProtocolConfig>
|
||||
+ // safe_browsing_config_;
|
||||
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
|
||||
scoped_refptr<net::URLRequestContextGetter> parent_request_context_for_test_;
|
||||
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
|
||||
|
||||
// SimpleURLLoader -> (owned loader, extension id).
|
||||
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
|
||||
@@ -284,13 +284,6 @@ ChromeDownloadManagerDelegate::~ChromeDo
|
||||
@@ -289,13 +289,6 @@ ChromeDownloadManagerDelegate::~ChromeDo
|
||||
|
||||
void ChromeDownloadManagerDelegate::SetDownloadManager(DownloadManager* dm) {
|
||||
download_manager_ = dm;
|
||||
@@ -377,8 +370,8 @@
|
||||
- }
|
||||
}
|
||||
|
||||
void ChromeDownloadManagerDelegate::Shutdown() {
|
||||
@@ -567,16 +560,6 @@ download::InProgressCache* ChromeDownloa
|
||||
#if defined(OS_ANDROID)
|
||||
@@ -579,16 +572,6 @@ download::InProgressCache* ChromeDownloa
|
||||
|
||||
void ChromeDownloadManagerDelegate::SanitizeSavePackageResourceName(
|
||||
base::FilePath* filename) {
|
||||
@@ -397,15 +390,15 @@
|
||||
void ChromeDownloadManagerDelegate::OpenDownloadUsingPlatformHandler(
|
||||
--- a/chrome/browser/browser_process_impl.cc
|
||||
+++ b/chrome/browser/browser_process_impl.cc
|
||||
@@ -70,7 +70,6 @@
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
@@ -71,7 +71,6 @@
|
||||
#include "chrome/browser/printing/print_preview_dialog_controller.h"
|
||||
#include "chrome/browser/profiles/profile_manager.h"
|
||||
#include "chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h"
|
||||
-#include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
||||
#include "chrome/browser/shell_integration.h"
|
||||
#include "chrome/browser/status_icons/status_tray.h"
|
||||
#include "chrome/browser/ui/browser_dialogs.h"
|
||||
@@ -333,8 +332,6 @@ void BrowserProcessImpl::StartTearDown()
|
||||
@@ -349,8 +348,6 @@ void BrowserProcessImpl::StartTearDown()
|
||||
// that URLFetcher operation before going away.)
|
||||
metrics_services_manager_.reset();
|
||||
intranet_redirect_detector_.reset();
|
||||
@@ -414,7 +407,7 @@
|
||||
network_time_tracker_.reset();
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
plugins_resource_service_.reset();
|
||||
@@ -936,22 +933,6 @@ StatusTray* BrowserProcessImpl::status_t
|
||||
@@ -957,22 +954,6 @@ StatusTray* BrowserProcessImpl::status_t
|
||||
return status_tray_.get();
|
||||
}
|
||||
|
||||
@@ -437,7 +430,7 @@
|
||||
subresource_filter::ContentRulesetService*
|
||||
BrowserProcessImpl::subresource_filter_ruleset_service() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -1219,16 +1200,6 @@ void BrowserProcessImpl::CreateBackgroun
|
||||
@@ -1240,16 +1221,6 @@ void BrowserProcessImpl::CreateBackgroun
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -456,7 +449,7 @@
|
||||
created_subresource_filter_ruleset_service_ = true;
|
||||
--- a/chrome/browser/browser_process_impl.h
|
||||
+++ b/chrome/browser/browser_process_impl.h
|
||||
@@ -135,9 +135,6 @@ class BrowserProcessImpl : public Browse
|
||||
@@ -143,9 +143,6 @@ class BrowserProcessImpl : public Browse
|
||||
void set_background_mode_manager_for_test(
|
||||
std::unique_ptr<BackgroundModeManager> manager) override;
|
||||
StatusTray* status_tray() override;
|
||||
@@ -466,7 +459,7 @@
|
||||
subresource_filter::ContentRulesetService*
|
||||
subresource_filter_ruleset_service() override;
|
||||
optimization_guide::OptimizationGuideService* optimization_guide_service()
|
||||
@@ -272,9 +269,6 @@ class BrowserProcessImpl : public Browse
|
||||
@@ -280,9 +277,6 @@ class BrowserProcessImpl : public Browse
|
||||
std::unique_ptr<BackgroundModeManager> background_mode_manager_;
|
||||
#endif
|
||||
|
||||
@@ -525,17 +518,7 @@
|
||||
#include "chrome/browser/ui/webui/md_downloads/downloads_list_tracker.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
#include "content/public/browser/web_ui_message_handler.h"
|
||||
@@ -107,9 +106,6 @@ class MdDownloadsDOMHandler : public con
|
||||
// dangerous ones are immediately removed. Protected for testing.
|
||||
void RemoveDownloads(const DownloadVector& to_remove);
|
||||
|
||||
- // Helper function to handle save download event.
|
||||
- void SaveDownload(download::DownloadItem* download);
|
||||
-
|
||||
private:
|
||||
using IdSet = std::set<uint32_t>;
|
||||
|
||||
@@ -121,19 +117,6 @@ class MdDownloadsDOMHandler : public con
|
||||
@@ -116,18 +115,6 @@ class MdDownloadsDOMHandler : public con
|
||||
// null-checking |original_notifier_|.
|
||||
content::DownloadManager* GetOriginalNotifierManager() const;
|
||||
|
||||
@@ -549,8 +532,7 @@
|
||||
-
|
||||
- // Conveys danger acceptance from the DownloadDangerPrompt to the
|
||||
- // DownloadItem.
|
||||
- virtual void DangerPromptDone(int download_id,
|
||||
- DownloadDangerPrompt::Action action);
|
||||
- void DangerPromptDone(int download_id, DownloadDangerPrompt::Action action);
|
||||
-
|
||||
// Returns true if the records of any downloaded items are allowed (and able)
|
||||
// to be deleted.
|
||||
@@ -565,41 +547,17 @@
|
||||
#include "chrome/browser/download/download_history.h"
|
||||
#include "chrome/browser/download/download_item_model.h"
|
||||
#include "chrome/browser/download/download_prefs.h"
|
||||
@@ -195,33 +194,6 @@ void MdDownloadsDOMHandler::HandleDrag(c
|
||||
@@ -197,9 +196,6 @@ void MdDownloadsDOMHandler::HandleDrag(c
|
||||
|
||||
void MdDownloadsDOMHandler::HandleSaveDangerous(const base::ListValue* args) {
|
||||
CountDownloadsDOMEvents(DOWNLOADS_DOM_EVENT_SAVE_DANGEROUS);
|
||||
- download::DownloadItem* file = GetDownloadByValue(args);
|
||||
- SaveDownload(file);
|
||||
-}
|
||||
-
|
||||
-void MdDownloadsDOMHandler::SaveDownload(download::DownloadItem* download) {
|
||||
- if (!download)
|
||||
- return;
|
||||
- // If danger type is NOT DANGEROUS_FILE, chrome shows users a download danger
|
||||
- // prompt.
|
||||
- if (download->GetDangerType() !=
|
||||
- download::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE) {
|
||||
- ShowDangerPrompt(download);
|
||||
- } else {
|
||||
- // If danger type is DANGEROUS_FILE, chrome proceeds to keep this download
|
||||
- // without showing download danger prompt.
|
||||
- if (profile_) {
|
||||
- PrefService* prefs = profile_->GetPrefs();
|
||||
- if (!profile_->IsOffTheRecord() &&
|
||||
- prefs->GetBoolean(prefs::kSafeBrowsingEnabled)) {
|
||||
- DownloadDangerPrompt::SendSafeBrowsingDownloadReport(
|
||||
- safe_browsing::ClientSafeBrowsingReportRequest::
|
||||
- DANGEROUS_DOWNLOAD_RECOVERY,
|
||||
- true, *download);
|
||||
- }
|
||||
- }
|
||||
- DangerPromptDone(download->GetId(), DownloadDangerPrompt::ACCEPT);
|
||||
- }
|
||||
- if (file)
|
||||
- ShowDangerPrompt(file);
|
||||
}
|
||||
|
||||
void MdDownloadsDOMHandler::HandleDiscardDangerous(
|
||||
@@ -323,12 +295,6 @@ void MdDownloadsDOMHandler::RemoveDownlo
|
||||
@@ -301,12 +297,6 @@ void MdDownloadsDOMHandler::RemoveDownlo
|
||||
IdSet ids;
|
||||
|
||||
for (auto* download : to_remove) {
|
||||
@@ -612,7 +570,7 @@
|
||||
DownloadItemModel item_model(download);
|
||||
if (!item_model.ShouldShowInShelf() ||
|
||||
download->GetState() == download::DownloadItem::IN_PROGRESS) {
|
||||
@@ -381,33 +347,6 @@ void MdDownloadsDOMHandler::FinalizeRemo
|
||||
@@ -359,33 +349,6 @@ void MdDownloadsDOMHandler::FinalizeRemo
|
||||
}
|
||||
}
|
||||
|
||||
@@ -656,7 +614,7 @@
|
||||
#include "chrome/browser/download/download_file_icon_extractor.h"
|
||||
#include "chrome/browser/download/download_prefs.h"
|
||||
#include "chrome/browser/download/download_query.h"
|
||||
@@ -1300,9 +1299,6 @@ DownloadsAcceptDangerFunction::Downloads
|
||||
@@ -1301,9 +1300,6 @@ DownloadsAcceptDangerFunction::Downloads
|
||||
|
||||
DownloadsAcceptDangerFunction::~DownloadsAcceptDangerFunction() {}
|
||||
|
||||
@@ -666,7 +624,7 @@
|
||||
bool DownloadsAcceptDangerFunction::RunAsync() {
|
||||
std::unique_ptr<downloads::AcceptDanger::Params> params(
|
||||
downloads::AcceptDanger::Params::Create(*args_));
|
||||
@@ -1338,40 +1334,7 @@ void DownloadsAcceptDangerFunction::Prom
|
||||
@@ -1339,40 +1335,7 @@ void DownloadsAcceptDangerFunction::Prom
|
||||
return;
|
||||
}
|
||||
RecordApiFunctions(DOWNLOADS_FUNCTION_ACCEPT_DANGER);
|
||||
@@ -746,7 +704,7 @@
|
||||
|
||||
--- a/chrome/browser/download/download_prefs.cc
|
||||
+++ b/chrome/browser/download/download_prefs.cc
|
||||
@@ -194,14 +194,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr
|
||||
@@ -195,14 +195,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr
|
||||
base::FilePath::StringType(1, base::FilePath::kExtensionSeparator) +
|
||||
extension);
|
||||
|
||||
@@ -762,7 +720,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,10 +352,6 @@ bool DownloadPrefs::IsAutoOpenEnabledBas
|
||||
@@ -360,10 +353,6 @@ bool DownloadPrefs::IsAutoOpenEnabledBas
|
||||
bool DownloadPrefs::EnableAutoOpenBasedOnExtension(
|
||||
const base::FilePath& file_name) {
|
||||
base::FilePath::StringType extension = file_name.Extension();
|
||||
@@ -798,7 +756,7 @@
|
||||
} // namespace
|
||||
--- a/chrome/browser/download/download_target_determiner.cc
|
||||
+++ b/chrome/browser/download/download_target_determiner.cc
|
||||
@@ -954,29 +954,7 @@ DownloadFileType::DangerLevel DownloadTa
|
||||
@@ -985,29 +985,7 @@ DownloadFileType::DangerLevel DownloadTa
|
||||
download_->HasUserGesture())
|
||||
return DownloadFileType::NOT_DANGEROUS;
|
||||
|
||||
@@ -829,20 +787,9 @@
|
||||
}
|
||||
|
||||
void DownloadTargetDeterminer::OnDownloadDestroyed(
|
||||
--- a/chrome/browser/permissions/permission_uma_util.cc
|
||||
+++ b/chrome/browser/permissions/permission_uma_util.cc
|
||||
@@ -433,8 +433,6 @@ void PermissionUmaUtil::RecordPermission
|
||||
PermissionReportInfo report_info(requesting_origin, permission, action,
|
||||
source_ui, gesture_type, dismiss_count,
|
||||
ignore_count);
|
||||
- g_browser_process->safe_browsing_service()
|
||||
- ->ui_manager()->ReportPermissionAction(report_info);
|
||||
}
|
||||
|
||||
if (web_contents) {
|
||||
--- a/chrome/browser/download/download_commands.cc
|
||||
+++ b/chrome/browser/download/download_commands.cc
|
||||
@@ -212,9 +212,6 @@ bool DownloadCommands::IsCommandEnabled(
|
||||
@@ -213,9 +213,6 @@ bool DownloadCommands::IsCommandEnabled(
|
||||
// filename. Don't base an "Always open" decision based on it. Also
|
||||
// exclude extensions.
|
||||
return download_item_->CanOpenDownload() &&
|
||||
@@ -854,7 +801,7 @@
|
||||
return !download_item_->IsDone();
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -2393,8 +2393,6 @@ jumbo_split_static_library("browser") {
|
||||
@@ -2402,8 +2402,6 @@ jumbo_split_static_library("browser") {
|
||||
"download/download_commands.h",
|
||||
"download/download_crx_util.cc",
|
||||
"download/download_crx_util.h",
|
||||
@@ -865,15 +812,15 @@
|
||||
"download/download_dir_util.cc",
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -2481,7 +2481,6 @@ split_static_library("ui") {
|
||||
"cocoa/bookmarks/bookmark_editor_controller.h",
|
||||
"cocoa/bookmarks/bookmark_editor_controller.mm",
|
||||
"cocoa/constrained_web_dialog_delegate_mac.mm",
|
||||
@@ -2525,7 +2525,6 @@ split_static_library("ui") {
|
||||
"cocoa/content_settings/cookie_tree_node.mm",
|
||||
"cocoa/content_settings/cookies_tree_controller_bridge.h",
|
||||
"cocoa/content_settings/cookies_tree_controller_bridge.mm",
|
||||
- "cocoa/download/download_danger_prompt_impl.cc",
|
||||
"cocoa/extensions/chooser_dialog_cocoa.h",
|
||||
"cocoa/extensions/chooser_dialog_cocoa.mm",
|
||||
"cocoa/extensions/chooser_dialog_cocoa_controller.h",
|
||||
@@ -2777,7 +2776,6 @@ split_static_library("ui") {
|
||||
@@ -2833,7 +2832,6 @@ split_static_library("ui") {
|
||||
"views/cookie_info_view.h",
|
||||
"views/device_chooser_content_view.cc",
|
||||
"views/device_chooser_content_view.h",
|
||||
@@ -883,7 +830,7 @@
|
||||
"views/exclusive_access_bubble_views.cc",
|
||||
--- a/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
@@ -246,61 +246,6 @@ bool SecurityStateTabHelper::UsedPolicyI
|
||||
@@ -246,62 +246,6 @@ bool SecurityStateTabHelper::UsedPolicyI
|
||||
|
||||
security_state::MaliciousContentStatus
|
||||
SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
@@ -935,6 +882,7 @@
|
||||
- case safe_browsing::SB_THREAT_TYPE_SUBRESOURCE_FILTER:
|
||||
- case safe_browsing::SB_THREAT_TYPE_CSD_WHITELIST:
|
||||
- case safe_browsing::SB_THREAT_TYPE_AD_SAMPLE:
|
||||
- case safe_browsing::SB_THREAT_TYPE_SUSPICIOUS_SITE:
|
||||
- // These threat types are not currently associated with
|
||||
- // interstitials, and thus resources with these threat types are
|
||||
- // not ever whitelisted or pending whitelisting.
|
||||
@@ -947,8 +895,8 @@
|
||||
|
||||
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
|
||||
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
|
||||
@@ -715,42 +715,6 @@ void ChromeBrowsingDataRemoverDelegate::
|
||||
CONTENT_SETTINGS_TYPE_CLIENT_HINTS, base::Time(),
|
||||
@@ -706,42 +706,6 @@ void ChromeBrowsingDataRemoverDelegate::
|
||||
CONTENT_SETTINGS_TYPE_CLIENT_HINTS, base::Time(), base::Time::Max(),
|
||||
base::BindRepeating(&WebsiteSettingsFilterAdapter, filter));
|
||||
|
||||
- // Clear the safebrowsing cookies only if time period is for "all time". It
|
||||
@@ -1001,93 +949,23 @@
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_list.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
@@ -83,18 +81,6 @@ namespace {
|
||||
// permission without having an associated renderer process yet.
|
||||
const int kInvalidRenderProcessId = -1;
|
||||
|
||||
-void ReportNotificationImageOnIOThread(
|
||||
- scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_service,
|
||||
- Profile* profile,
|
||||
- const GURL& origin,
|
||||
- const SkBitmap& image) {
|
||||
- DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
- if (!safe_browsing_service || !safe_browsing_service->enabled())
|
||||
- return;
|
||||
- safe_browsing_service->ping_manager()->ReportNotificationImage(
|
||||
- profile, safe_browsing_service->database_manager(), origin, image);
|
||||
-}
|
||||
-
|
||||
// Whether a web notification should be displayed when chrome is in full
|
||||
// screen mode.
|
||||
static bool ShouldDisplayWebNotificationOnFullScreen(Profile* profile,
|
||||
@@ -513,13 +499,6 @@ PlatformNotificationServiceImpl::CreateN
|
||||
@@ -500,16 +498,6 @@ PlatformNotificationServiceImpl::CreateN
|
||||
notification.set_type(message_center::NOTIFICATION_TYPE_IMAGE);
|
||||
notification.set_image(
|
||||
gfx::Image::CreateFrom1xBitmap(notification_resources.image));
|
||||
- // n.b. this should only be posted once per notification.
|
||||
- BrowserThread::PostTask(
|
||||
- BrowserThread::IO, FROM_HERE,
|
||||
- base::BindOnce(
|
||||
- &ReportNotificationImageOnIOThread,
|
||||
- base::WrapRefCounted(g_browser_process->safe_browsing_service()),
|
||||
- profile, origin, notification_resources.image));
|
||||
- if (g_browser_process->safe_browsing_service() &&
|
||||
- g_browser_process->safe_browsing_service()->enabled_by_prefs()) {
|
||||
- g_browser_process->safe_browsing_service()
|
||||
- ->ping_manager()
|
||||
- ->ReportNotificationImage(
|
||||
- profile,
|
||||
- g_browser_process->safe_browsing_service()->database_manager(),
|
||||
- origin, notification_resources.image);
|
||||
- }
|
||||
}
|
||||
|
||||
// Badges are only supported on Android, primarily because it's the only
|
||||
--- a/chrome/browser/permissions/permission_blacklist_client.cc
|
||||
+++ b/chrome/browser/permissions/permission_blacklist_client.cc
|
||||
@@ -56,50 +56,11 @@ PermissionBlacklistClient::~PermissionBl
|
||||
void PermissionBlacklistClient::StartCheck(const GURL& request_origin) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
||||
|
||||
- // Start the timer to interrupt into the client callback method with an
|
||||
- // empty response if Safe Browsing times out.
|
||||
- safe_browsing::ThreatMetadata empty_metadata;
|
||||
- timer_ = std::make_unique<base::OneShotTimer>();
|
||||
- elapsed_timer_.reset(new base::ElapsedTimer());
|
||||
- timer_->Start(
|
||||
- FROM_HERE, base::TimeDelta::FromMilliseconds(timeout_),
|
||||
- base::Bind(&PermissionBlacklistClient::OnCheckApiBlacklistUrlResult, this,
|
||||
- request_origin, empty_metadata));
|
||||
- // If CheckApiBlacklistUrl returns true, no asynchronous call to |this| will
|
||||
- // be made, so just directly call through to OnCheckApiBlacklistUrlResult.
|
||||
- if (db_manager_->CheckApiBlacklistUrl(request_origin, this))
|
||||
- OnCheckApiBlacklistUrlResult(request_origin, empty_metadata);
|
||||
-}
|
||||
-
|
||||
-void PermissionBlacklistClient::OnCheckApiBlacklistUrlResult(
|
||||
- const GURL& url,
|
||||
- const safe_browsing::ThreatMetadata& metadata) {
|
||||
- DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
||||
-
|
||||
- base::TimeDelta response_time = elapsed_timer_->Elapsed();
|
||||
- SafeBrowsingResponse response = SafeBrowsingResponse::NOT_BLACKLISTED;
|
||||
-
|
||||
- if (timer_->IsRunning()) {
|
||||
- timer_->Stop();
|
||||
- } else {
|
||||
- db_manager_->CancelApiCheck(this);
|
||||
- response = SafeBrowsingResponse::TIMEOUT;
|
||||
- }
|
||||
-
|
||||
- timer_.reset(nullptr);
|
||||
- bool permission_blocked =
|
||||
- metadata.api_permissions.find(
|
||||
- PermissionUtil::ConvertContentSettingsTypeToSafeBrowsingName(
|
||||
- content_settings_type_)) != metadata.api_permissions.end();
|
||||
- if (permission_blocked)
|
||||
- response = SafeBrowsingResponse::BLACKLISTED;
|
||||
-
|
||||
- PermissionUmaUtil::RecordSafeBrowsingResponse(response_time, response);
|
||||
content::BrowserThread::PostTask(
|
||||
content::BrowserThread::UI, FROM_HERE,
|
||||
base::BindOnce(
|
||||
&PermissionBlacklistClient::EvaluateBlacklistResultOnUiThread, this,
|
||||
- permission_blocked));
|
||||
+ false));
|
||||
}
|
||||
|
||||
void PermissionBlacklistClient::EvaluateBlacklistResultOnUiThread(
|
||||
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
|
||||
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
|
||||
@@ -45,7 +45,6 @@
|
||||
@@ -1098,7 +976,7 @@
|
||||
#include "chrome/browser/sync/chrome_sync_client.h"
|
||||
#include "chrome/browser/sync/profile_sync_service_factory.h"
|
||||
#include "chrome/browser/translate/translate_ranker_metrics_provider.h"
|
||||
@@ -675,9 +674,6 @@ void ChromeMetricsServiceClient::Registe
|
||||
@@ -718,9 +717,6 @@ void ChromeMetricsServiceClient::Registe
|
||||
metrics_service_->RegisterMetricsProvider(
|
||||
std::make_unique<HttpsEngagementMetricsProvider>());
|
||||
|
||||
@@ -1108,23 +986,9 @@
|
||||
#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
|
||||
metrics_service_->RegisterMetricsProvider(
|
||||
std::make_unique<UpgradeMetricsProvider>());
|
||||
--- a/chrome/browser/permissions/permission_blacklist_client.h
|
||||
+++ b/chrome/browser/permissions/permission_blacklist_client.h
|
||||
@@ -59,11 +59,6 @@ class PermissionBlacklistClient
|
||||
|
||||
void StartCheck(const GURL& request_origin);
|
||||
|
||||
- // SafeBrowsingDatabaseManager::Client implementation.
|
||||
- void OnCheckApiBlacklistUrlResult(
|
||||
- const GURL& url,
|
||||
- const safe_browsing::ThreatMetadata& metadata) override;
|
||||
-
|
||||
void EvaluateBlacklistResultOnUiThread(bool response);
|
||||
|
||||
// WebContentsObserver implementation. Sets a flag so that when the database
|
||||
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
|
||||
@@ -217,7 +217,6 @@ EnsureBrowserContextKeyedServiceFactorie
|
||||
@@ -223,7 +223,6 @@ EnsureBrowserContextKeyedServiceFactorie
|
||||
#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION)
|
||||
CaptivePortalServiceFactory::GetInstance();
|
||||
#endif
|
||||
@@ -1157,7 +1021,7 @@
|
||||
captive_portal::CaptivePortalMetrics::LogCaptivePortalBlockingPageEvent(
|
||||
--- a/chrome/browser/ssl/cert_report_helper.cc
|
||||
+++ b/chrome/browser/ssl/cert_report_helper.cc
|
||||
@@ -183,8 +183,6 @@ void CertReportHelper::FinishCertCollect
|
||||
@@ -182,8 +182,6 @@ void CertReportHelper::FinishCertCollect
|
||||
LOG(ERROR) << "Failed to serialize certificate report.";
|
||||
return;
|
||||
}
|
||||
@@ -1168,7 +1032,7 @@
|
||||
bool CertReportHelper::ShouldShowCertificateReporterCheckbox() {
|
||||
--- a/chrome/browser/ui/tab_helpers.cc
|
||||
+++ b/chrome/browser/ui/tab_helpers.cc
|
||||
@@ -239,8 +239,6 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
@@ -237,8 +237,6 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
PrefsTabHelper::CreateForWebContents(web_contents);
|
||||
prerender::PrerenderTabHelper::CreateForWebContents(web_contents);
|
||||
PreviewsInfoBarTabHelper::CreateForWebContents(web_contents);
|
||||
@@ -1177,7 +1041,7 @@
|
||||
SearchEngineTabHelper::CreateForWebContents(web_contents);
|
||||
SecurityStateTabHelper::CreateForWebContents(web_contents);
|
||||
if (SiteEngagementService::IsEnabled())
|
||||
@@ -289,9 +287,6 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
@@ -287,9 +285,6 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
new ChromePDFWebContentsHelperClient()));
|
||||
PluginObserver::CreateForWebContents(web_contents);
|
||||
SadTabHelper::CreateForWebContents(web_contents);
|
||||
@@ -1187,30 +1051,9 @@
|
||||
SearchTabHelper::CreateForWebContents(web_contents);
|
||||
TabContentsSyncedTabDelegate::CreateForWebContents(web_contents);
|
||||
TabDialogs::CreateForWebContents(web_contents);
|
||||
--- a/chrome/browser/permissions/permission_decision_auto_blocker.cc
|
||||
+++ b/chrome/browser/permissions/permission_decision_auto_blocker.cc
|
||||
@@ -17,7 +17,6 @@
|
||||
#include "chrome/browser/permissions/permission_util.h"
|
||||
#include "chrome/browser/profiles/incognito_helpers.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
-#include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
||||
#include "chrome/common/chrome_features.h"
|
||||
#include "components/keyed_service/content/browser_context_dependency_manager.h"
|
||||
#include "components/safe_browsing/db/database_manager.h"
|
||||
@@ -424,10 +423,6 @@ PermissionDecisionAutoBlocker::Permissio
|
||||
db_manager_(nullptr),
|
||||
safe_browsing_timeout_(kCheckUrlTimeoutMs),
|
||||
clock_(new base::DefaultClock()) {
|
||||
- safe_browsing::SafeBrowsingService* sb_service =
|
||||
- g_browser_process->safe_browsing_service();
|
||||
- if (sb_service)
|
||||
- db_manager_ = sb_service->database_manager();
|
||||
}
|
||||
|
||||
PermissionDecisionAutoBlocker::~PermissionDecisionAutoBlocker() {}
|
||||
--- a/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
|
||||
+++ b/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
|
||||
@@ -44,14 +44,7 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(Chrome
|
||||
@@ -43,14 +43,7 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(Chrome
|
||||
namespace {
|
||||
|
||||
scoped_refptr<safe_browsing::SafeBrowsingDatabaseManager> GetDatabaseManager() {
|
||||
@@ -1226,7 +1069,7 @@
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -73,21 +66,6 @@ ChromeSubresourceFilterClient::~ChromeSu
|
||||
@@ -72,21 +65,6 @@ ChromeSubresourceFilterClient::~ChromeSu
|
||||
void ChromeSubresourceFilterClient::MaybeAppendNavigationThrottles(
|
||||
content::NavigationHandle* navigation_handle,
|
||||
std::vector<std::unique_ptr<content::NavigationThrottle>>* throttles) {
|
||||
@@ -1410,7 +1253,7 @@
|
||||
void SystemNetworkContextManager::FlushProxyConfigMonitorForTesting() {
|
||||
--- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
|
||||
+++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
|
||||
@@ -449,9 +449,8 @@ void AddBluetoothStrings(content::WebUID
|
||||
@@ -458,9 +458,8 @@ void AddBluetoothStrings(content::WebUID
|
||||
#endif
|
||||
|
||||
void AddChangePasswordStrings(content::WebUIDataSource* html_source) {
|
||||
@@ -1424,15 +1267,15 @@
|
||||
? IDS_SETTINGS_CHANGE_PASSWORD_TITLE_SOFTER
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -79,7 +79,6 @@
|
||||
@@ -77,7 +77,6 @@
|
||||
#include "components/error_page/common/localized_error.h"
|
||||
#include "components/network_hints/renderer/prescient_networking_dispatcher.h"
|
||||
#include "components/pdf/renderer/pepper_pdf_host.h"
|
||||
-#include "components/safe_browsing/renderer/threat_dom_details.h"
|
||||
#include "components/safe_browsing/renderer/websocket_sb_handshake_throttle.h"
|
||||
#include "components/spellcheck/spellcheck_build_features.h"
|
||||
#include "components/startup_metric_utils/common/startup_metric.mojom.h"
|
||||
@@ -1387,9 +1386,7 @@ void ChromeContentRendererClient::InitSp
|
||||
#include "components/services/heap_profiling/public/cpp/allocator_shim.h"
|
||||
#include "components/spellcheck/spellcheck_buildflags.h"
|
||||
@@ -1393,9 +1392,7 @@ void ChromeContentRendererClient::InitSp
|
||||
|
||||
std::unique_ptr<blink::WebSocketHandshakeThrottle>
|
||||
ChromeContentRendererClient::CreateWebSocketHandshakeThrottle() {
|
||||
@@ -1443,7 +1286,7 @@
|
||||
}
|
||||
|
||||
std::unique_ptr<blink::WebSpeechSynthesizer>
|
||||
@@ -1680,13 +1677,6 @@ ChromeContentRendererClient::GetTaskSche
|
||||
@@ -1678,13 +1675,6 @@ ChromeContentRendererClient::GetTaskSche
|
||||
return task_scheduler_util::GetTaskSchedulerInitParamsForRenderer();
|
||||
}
|
||||
|
||||
@@ -1464,10 +1307,10 @@
|
||||
#include "components/nacl/common/buildflags.h"
|
||||
#include "components/rappor/public/interfaces/rappor_recorder.mojom.h"
|
||||
-#include "components/safe_browsing/common/safe_browsing.mojom.h"
|
||||
#include "components/spellcheck/spellcheck_build_features.h"
|
||||
#include "components/spellcheck/spellcheck_buildflags.h"
|
||||
#include "content/public/renderer/content_renderer_client.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
@@ -270,9 +269,6 @@ class ChromeContentRendererClient
|
||||
@@ -275,9 +274,6 @@ class ChromeContentRendererClient
|
||||
void GetInterface(const std::string& name,
|
||||
mojo::ScopedMessagePipeHandle request_handle) override;
|
||||
|
||||
@@ -1477,7 +1320,7 @@
|
||||
void PrepareErrorPageInternal(content::RenderFrame* render_frame,
|
||||
const blink::WebURLRequest& failed_request,
|
||||
const error_page::Error& error,
|
||||
@@ -305,8 +301,6 @@ class ChromeContentRendererClient
|
||||
@@ -317,8 +313,6 @@ class ChromeContentRendererClient
|
||||
|
||||
ChromeKeySystemsProvider key_systems_provider_;
|
||||
|
||||
@@ -1486,3 +1329,15 @@
|
||||
#if BUILDFLAG(ENABLE_SPELLCHECK)
|
||||
std::unique_ptr<SpellCheck> spellcheck_;
|
||||
#endif
|
||||
--- a/chrome/browser/net/trial_comparison_cert_verifier.cc
|
||||
+++ b/chrome/browser/net/trial_comparison_cert_verifier.cc
|
||||
@@ -93,9 +93,6 @@ void SendTrialVerificationReport(void* p
|
||||
std::string serialized_report;
|
||||
if (!report.Serialize(&serialized_report))
|
||||
return;
|
||||
-
|
||||
- CertificateReportingServiceFactory::GetForBrowserContext(profile)->Send(
|
||||
- serialized_report);
|
||||
}
|
||||
|
||||
std::unique_ptr<base::Value> TrialVerificationJobResultCallback(
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
net::URLRequestContext* request_context =
|
||||
request_context_getter_->GetURLRequestContext();
|
||||
if (!request_context) {
|
||||
@@ -117,6 +118,7 @@ class ReportingServiceProxyImpl : public
|
||||
}
|
||||
|
||||
reporting_service->QueueReport(url, group, type, std::move(body));
|
||||
@@ -120,6 +121,7 @@ class ReportingServiceProxyImpl : public
|
||||
// renderer.
|
||||
reporting_service->QueueReport(url, group, type, std::move(body),
|
||||
/* depth= */ 0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
mutable std::unique_ptr<LazyParams> lazy_params_;
|
||||
--- a/chrome/browser/profiles/profile_io_data.cc
|
||||
+++ b/chrome/browser/profiles/profile_io_data.cc
|
||||
@@ -630,7 +630,9 @@ void ProfileIOData::AppRequestContext::S
|
||||
@@ -623,7 +623,9 @@ void ProfileIOData::AppRequestContext::S
|
||||
void ProfileIOData::AppRequestContext::SetReportingService(
|
||||
std::unique_ptr<net::ReportingService> reporting_service) {
|
||||
reporting_service_ = std::move(reporting_service);
|
||||
@@ -52,7 +52,7 @@
|
||||
void ProfileIOData::AppRequestContext::SetNetworkErrorLoggingService(
|
||||
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
|
||||
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
|
||||
@@ -268,10 +268,12 @@ void ClearReportingCacheOnIOThread(
|
||||
@@ -271,10 +271,12 @@ void ClearReportingCacheOnIOThread(
|
||||
const base::RepeatingCallback<bool(const GURL&)>& origin_filter) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -856,7 +856,7 @@ void ChromeContentBrowserClient::Registe
|
||||
@@ -966,7 +966,7 @@ void ChromeContentBrowserClient::Registe
|
||||
void ChromeContentBrowserClient::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
|
||||
@@ -11,7 +11,7 @@
|
||||
// user policy in addition to the same named ones in Local State (which are
|
||||
--- a/chrome/browser/ui/browser_ui_prefs.cc
|
||||
+++ b/chrome/browser/ui/browser_ui_prefs.cc
|
||||
@@ -65,11 +65,11 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
@@ -70,11 +70,11 @@ void RegisterBrowserUserPrefs(user_prefs
|
||||
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
|
||||
registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
|
||||
registry->RegisterBooleanPref(
|
||||
@@ -49,7 +49,7 @@
|
||||
enum class NetworkPredictionStatus {
|
||||
--- a/chrome/browser/background/background_mode_manager.cc
|
||||
+++ b/chrome/browser/background/background_mode_manager.cc
|
||||
@@ -363,7 +363,7 @@ void BackgroundModeManager::RegisterPref
|
||||
@@ -362,7 +362,7 @@ void BackgroundModeManager::RegisterPref
|
||||
registry->RegisterBooleanPref(prefs::kChromeCreatedLoginItem, false);
|
||||
registry->RegisterBooleanPref(prefs::kMigratedLoginItemPref, false);
|
||||
#endif
|
||||
@@ -60,7 +60,7 @@
|
||||
void BackgroundModeManager::RegisterProfile(Profile* profile) {
|
||||
--- a/components/content_settings/core/browser/cookie_settings.cc
|
||||
+++ b/components/content_settings/core/browser/cookie_settings.cc
|
||||
@@ -100,7 +100,7 @@ void CookieSettings::GetCookieSettings(
|
||||
@@ -111,7 +111,7 @@ void CookieSettings::GetCookieSettings(
|
||||
void CookieSettings::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
registry->RegisterBooleanPref(
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
--- a/components/autofill/core/browser/autofill_manager.cc
|
||||
+++ b/components/autofill/core/browser/autofill_manager.cc
|
||||
@@ -215,7 +215,7 @@ void AutofillManager::RegisterProfilePre
|
||||
@@ -227,7 +227,7 @@ void AutofillManager::RegisterProfilePre
|
||||
registry->RegisterIntegerPref(
|
||||
prefs::kAutofillCreditCardSigninPromoImpressionCount, 0);
|
||||
registry->RegisterBooleanPref(
|
||||
@@ -101,10 +101,10 @@
|
||||
+ <paper-checkbox id="sendSettings">
|
||||
$i18nRaw{resetPageFeedback}</paper-checkbox>
|
||||
</div>
|
||||
</dialog>
|
||||
</cr-dialog>
|
||||
--- a/chrome/browser/io_thread.cc
|
||||
+++ b/chrome/browser/io_thread.cc
|
||||
@@ -629,7 +629,7 @@ void IOThread::RegisterPrefs(PrefRegistr
|
||||
@@ -615,7 +615,7 @@ void IOThread::RegisterPrefs(PrefRegistr
|
||||
std::string());
|
||||
registry->RegisterBooleanPref(prefs::kEnableReferrers, true);
|
||||
data_reduction_proxy::RegisterPrefs(registry);
|
||||
@@ -180,7 +180,7 @@
|
||||
}
|
||||
--- a/extensions/common/extension.cc
|
||||
+++ b/extensions/common/extension.cc
|
||||
@@ -330,14 +330,6 @@ bool Extension::ShouldDisplayInExtension
|
||||
@@ -368,14 +368,6 @@ bool Extension::ShouldDisplayInExtension
|
||||
if (is_theme())
|
||||
return false;
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
// functionality that are only available in chrome://extensions/ but which
|
||||
--- a/components/safe_browsing/common/safe_browsing_prefs.cc
|
||||
+++ b/components/safe_browsing/common/safe_browsing_prefs.cc
|
||||
@@ -370,9 +370,9 @@ void RegisterProfilePrefs(PrefRegistrySi
|
||||
@@ -374,9 +374,9 @@ void RegisterProfilePrefs(PrefRegistrySi
|
||||
registry->RegisterBooleanPref(
|
||||
prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
|
||||
registry->RegisterBooleanPref(
|
||||
@@ -222,5 +222,5 @@
|
||||
- prefs::kCredentialsEnableAutosignin, true,
|
||||
+ prefs::kCredentialsEnableAutosignin, false,
|
||||
user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
|
||||
registry->RegisterBooleanPref(prefs::kWasObsoleteHttpDataCleaned, false);
|
||||
registry->RegisterStringPref(prefs::kSyncPasswordHash, std::string(),
|
||||
PrefRegistry::NO_REGISTRATION_FLAGS);
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
request_pending_ = true;
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
@@ -158,7 +158,6 @@ void SpellcheckHunspellDictionary::Retry
|
||||
@@ -164,7 +164,6 @@ void SpellcheckHunspellDictionary::Retry
|
||||
return;
|
||||
}
|
||||
request_context_getter_ = request_context_getter;
|
||||
browser_context_ = browser_context;
|
||||
- DownloadDictionary(GetDictionaryURL());
|
||||
}
|
||||
|
||||
bool SpellcheckHunspellDictionary::IsReady() const {
|
||||
@@ -377,9 +376,6 @@ void SpellcheckHunspellDictionary::Initi
|
||||
@@ -401,9 +400,6 @@ void SpellcheckHunspellDictionary::Initi
|
||||
}
|
||||
|
||||
if (request_context_getter_) {
|
||||
- // Download from the UI thread to check that |request_context_getter_| is
|
||||
if (browser_context_) {
|
||||
- // Download from the UI thread to check that |browser_context_| is
|
||||
- // still valid.
|
||||
- DownloadDictionary(GetDictionaryURL());
|
||||
return;
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
--- a/components/translate/core/browser/translate_ranker_impl.cc
|
||||
+++ b/components/translate/core/browser/translate_ranker_impl.cc
|
||||
@@ -150,14 +150,10 @@ TranslateRankerImpl::TranslateRankerImpl
|
||||
@@ -154,14 +154,10 @@ TranslateRankerImpl::TranslateRankerImpl
|
||||
ukm::UkmRecorder* ukm_recorder)
|
||||
: ukm_recorder_(ukm_recorder),
|
||||
is_logging_enabled_(false),
|
||||
@@ -50,7 +50,7 @@
|
||||
weak_ptr_factory_(this) {
|
||||
if (is_query_enabled_ || is_enforcement_enabled_) {
|
||||
model_loader_ = std::make_unique<assist_ranker::RankerModelLoaderImpl>(
|
||||
@@ -231,6 +227,8 @@ bool TranslateRankerImpl::ShouldOfferTra
|
||||
@@ -235,6 +231,8 @@ bool TranslateRankerImpl::ShouldOfferTra
|
||||
// (or become False).
|
||||
const bool kDefaultResponse = true;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Disable rlz
|
||||
|
||||
--- a/rlz/features/features.gni
|
||||
+++ b/rlz/features/features.gni
|
||||
--- a/rlz/buildflags/buildflags.gni
|
||||
+++ b/rlz/buildflags/buildflags.gni
|
||||
@@ -6,6 +6,6 @@ import("//build/config/chrome_build.gni"
|
||||
|
||||
# Whether we are using the rlz library or not. Platforms like Android send
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1206,6 +1206,11 @@ const FeatureEntry::FeatureVariation kSi
|
||||
@@ -1225,6 +1225,11 @@ const FeatureEntry::FeatureVariation kSi
|
||||
//
|
||||
// When adding a new choice, add it to the end of the list.
|
||||
const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -12,228 +12,88 @@
|
||||
{"ignore-gpu-blacklist", flag_descriptions::kIgnoreGpuBlacklistName,
|
||||
flag_descriptions::kIgnoreGpuBlacklistDescription, kOsAll,
|
||||
SINGLE_VALUE_TYPE(switches::kIgnoreGpuBlacklist)},
|
||||
--- a/base/metrics/histogram_base.h
|
||||
+++ b/base/metrics/histogram_base.h
|
||||
@@ -94,6 +94,12 @@ BASE_EXPORT HistogramBase* DeserializeHi
|
||||
|
||||
class BASE_EXPORT HistogramBase {
|
||||
public:
|
||||
+ // Allow histograms to be disabled.
|
||||
+ static const std::string& kDummyName;
|
||||
+ static const std::string& kDummySparseName;
|
||||
+ static bool MetricsEnabled();
|
||||
+ bool enabled = false;
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -575,6 +575,8 @@ jumbo_component("base") {
|
||||
"message_loop/watchable_io_message_pump_posix.h",
|
||||
"metrics/bucket_ranges.cc",
|
||||
"metrics/bucket_ranges.h",
|
||||
+ "metrics/command_line_handler.cc",
|
||||
+ "metrics/command_line_handler.h",
|
||||
"metrics/dummy_histogram.cc",
|
||||
"metrics/dummy_histogram.h",
|
||||
"metrics/field_trial.cc",
|
||||
--- a/tools/gn/bootstrap/bootstrap.py
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py
|
||||
@@ -535,6 +535,7 @@ def write_gn_ninja(path, root_gen_dir, o
|
||||
'base/message_loop/message_pump_default.cc',
|
||||
'base/message_loop/watchable_io_message_pump_posix.cc',
|
||||
'base/metrics/bucket_ranges.cc',
|
||||
+ 'base/metrics/command_line_handler.cc',
|
||||
'base/metrics/dummy_histogram.cc',
|
||||
'base/metrics/field_trial.cc',
|
||||
'base/metrics/field_trial_param_associator.cc',
|
||||
--- /dev/null
|
||||
+++ b/base/metrics/command_line_handler.cc
|
||||
@@ -0,0 +1,11 @@
|
||||
+#include "base/metrics/command_line_handler.h"
|
||||
+
|
||||
typedef int32_t Sample; // Used for samples.
|
||||
typedef subtle::Atomic32 AtomicCount; // Used to count samples.
|
||||
typedef int32_t Count; // Used to manipulate counts in temporaries.
|
||||
--- a/base/metrics/histogram_base.cc
|
||||
+++ b/base/metrics/histogram_base.cc
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <set>
|
||||
#include <utility>
|
||||
|
||||
+#include "base/command_line.h"
|
||||
#include "base/json/json_string_value_serializer.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/logging.h"
|
||||
@@ -65,6 +66,12 @@ HistogramBase* DeserializeHistogramInfo(
|
||||
}
|
||||
}
|
||||
|
||||
+const std::string& HistogramBase::kDummyName = "Dummy";
|
||||
+const std::string& HistogramBase::kDummySparseName = "DummySparse";
|
||||
+bool HistogramBase::MetricsEnabled() {
|
||||
+
|
||||
+namespace base {
|
||||
+
|
||||
+bool MetricsEnabled() {
|
||||
+ return base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics");
|
||||
+}
|
||||
+
|
||||
const HistogramBase::Sample HistogramBase::kSampleType_MAX = INT_MAX;
|
||||
|
||||
HistogramBase::HistogramBase(const char* name)
|
||||
--- a/base/metrics/histogram.cc
|
||||
+++ b/base/metrics/histogram.cc
|
||||
@@ -123,7 +123,8 @@ class Histogram::Factory {
|
||||
minimum_(minimum),
|
||||
maximum_(maximum),
|
||||
bucket_count_(bucket_count),
|
||||
- flags_(flags) {}
|
||||
+ flags_(flags),
|
||||
+ enabled_(HistogramBase::MetricsEnabled()) {}
|
||||
|
||||
// Create a BucketRanges structure appropriate for this histogram.
|
||||
virtual BucketRanges* CreateRanges() {
|
||||
@@ -153,13 +154,18 @@ class Histogram::Factory {
|
||||
HistogramBase::Sample maximum_;
|
||||
uint32_t bucket_count_;
|
||||
int32_t flags_;
|
||||
+ const bool enabled_;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(Factory);
|
||||
};
|
||||
|
||||
HistogramBase* Histogram::Factory::Build() {
|
||||
- HistogramBase* histogram = StatisticsRecorder::FindHistogram(name_);
|
||||
+ std::string overridden_name = HistogramBase::kDummyName;
|
||||
+ if (enabled_)
|
||||
+ overridden_name = name_;
|
||||
+} // namespace base
|
||||
--- /dev/null
|
||||
+++ b/base/metrics/command_line_handler.h
|
||||
@@ -0,0 +1,11 @@
|
||||
+#ifndef BASE_METRICS_COMMAND_LINE_HANDLER_H_
|
||||
+#define BASE_METRICS_COMMAND_LINE_HANDLER_H_
|
||||
+
|
||||
+ HistogramBase* histogram = StatisticsRecorder::FindHistogram(overridden_name);
|
||||
if (!histogram) {
|
||||
// To avoid racy destruction at shutdown, the following will be leaked.
|
||||
const BucketRanges* created_ranges = CreateRanges();
|
||||
@@ -190,7 +196,7 @@ HistogramBase* Histogram::Factory::Build
|
||||
if (allocator) {
|
||||
tentative_histogram = allocator->AllocateHistogram(
|
||||
histogram_type_,
|
||||
- name_,
|
||||
+ overridden_name,
|
||||
minimum_,
|
||||
maximum_,
|
||||
registered_ranges,
|
||||
@@ -225,6 +231,10 @@ HistogramBase* Histogram::Factory::Build
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!enabled_)
|
||||
+ return histogram;
|
||||
+namespace base {
|
||||
+
|
||||
+ histogram->enabled = true;
|
||||
CHECK_EQ(histogram_type_, histogram->GetHistogramType()) << name_;
|
||||
if (bucket_count_ != 0 &&
|
||||
!histogram->HasConstructionArguments(minimum_, maximum_, bucket_count_)) {
|
||||
@@ -461,10 +471,16 @@ bool Histogram::HasConstructionArguments
|
||||
+// Checks the command-line flag 'enable-metrics'.
|
||||
+bool MetricsEnabled();
|
||||
+
|
||||
+} // namespace base
|
||||
+
|
||||
+#endif // BASE_METRICS_COMMAND_LINE_HANDLER_H_
|
||||
--- a/components/metrics/expired_histograms_checker.cc
|
||||
+++ b/components/metrics/expired_histograms_checker.cc
|
||||
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include "base/metrics/command_line_handler.h"
|
||||
#include "components/metrics/expired_histograms_checker.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -15,6 +16,9 @@ ExpiredHistogramsChecker::ExpiredHistogr
|
||||
ExpiredHistogramsChecker::~ExpiredHistogramsChecker() {}
|
||||
|
||||
bool ExpiredHistogramsChecker::ShouldRecord(uint64_t histogram_hash) const {
|
||||
+ if (!base::MetricsEnabled())
|
||||
+ return false;
|
||||
+
|
||||
return !std::binary_search(array_, array_ + size_, histogram_hash);
|
||||
}
|
||||
|
||||
void Histogram::Add(int value) {
|
||||
+ if (!enabled)
|
||||
+ return;
|
||||
+
|
||||
AddCount(value, 1);
|
||||
}
|
||||
|
||||
void Histogram::AddCount(int value, int count) {
|
||||
+ if (!enabled)
|
||||
+ return;
|
||||
+
|
||||
DCHECK_EQ(0, ranges(0));
|
||||
DCHECK_EQ(kSampleType_MAX, ranges(bucket_count()));
|
||||
|
||||
@@ -519,10 +535,16 @@ std::unique_ptr<HistogramSamples> Histog
|
||||
}
|
||||
|
||||
void Histogram::AddSamples(const HistogramSamples& samples) {
|
||||
+ if (!enabled)
|
||||
+ return;
|
||||
+
|
||||
unlogged_samples_->Add(samples);
|
||||
}
|
||||
|
||||
bool Histogram::AddSamplesFromPickle(PickleIterator* iter) {
|
||||
+ if (!enabled)
|
||||
+ return true;
|
||||
+
|
||||
return unlogged_samples_->AddFromPickle(iter);
|
||||
}
|
||||
|
||||
--- a/base/metrics/sparse_histogram.cc
|
||||
+++ b/base/metrics/sparse_histogram.cc
|
||||
@@ -24,7 +24,12 @@ typedef HistogramBase::Sample Sample;
|
||||
// static
|
||||
HistogramBase* SparseHistogram::FactoryGet(const std::string& name,
|
||||
int32_t flags) {
|
||||
- HistogramBase* histogram = StatisticsRecorder::FindHistogram(name);
|
||||
+ const bool enabled_ = HistogramBase::MetricsEnabled();
|
||||
+ std::string overridden_name = HistogramBase::kDummySparseName;
|
||||
+ if (enabled_)
|
||||
+ overridden_name = name;
|
||||
+
|
||||
+ HistogramBase* histogram = StatisticsRecorder::FindHistogram(overridden_name);
|
||||
if (!histogram) {
|
||||
// Try to create the histogram using a "persistent" allocator. As of
|
||||
// 2016-02-25, the availability of such is controlled by a base::Feature
|
||||
@@ -36,7 +41,7 @@ HistogramBase* SparseHistogram::FactoryG
|
||||
PersistentHistogramAllocator* allocator = GlobalHistogramAllocator::Get();
|
||||
if (allocator) {
|
||||
tentative_histogram = allocator->AllocateHistogram(
|
||||
- SPARSE_HISTOGRAM, name, 0, 0, nullptr, flags, &histogram_ref);
|
||||
+ SPARSE_HISTOGRAM, overridden_name, 0, 0, nullptr, flags, &histogram_ref);
|
||||
}
|
||||
|
||||
// Handle the case where no persistent allocator is present or the
|
||||
@@ -45,7 +50,7 @@ HistogramBase* SparseHistogram::FactoryG
|
||||
DCHECK(!histogram_ref); // Should never have been set.
|
||||
DCHECK(!allocator); // Shouldn't have failed.
|
||||
flags &= ~HistogramBase::kIsPersistent;
|
||||
- tentative_histogram.reset(new SparseHistogram(GetPermanentName(name)));
|
||||
+ tentative_histogram.reset(new SparseHistogram(GetPermanentName(overridden_name)));
|
||||
tentative_histogram->SetFlags(flags);
|
||||
}
|
||||
|
||||
@@ -64,6 +69,10 @@ HistogramBase* SparseHistogram::FactoryG
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!enabled_)
|
||||
+ return histogram;
|
||||
+
|
||||
+ histogram->enabled = true;
|
||||
CHECK_EQ(SPARSE_HISTOGRAM, histogram->GetHistogramType());
|
||||
return histogram;
|
||||
}
|
||||
@@ -97,10 +106,16 @@ bool SparseHistogram::HasConstructionArg
|
||||
}
|
||||
|
||||
void SparseHistogram::Add(Sample value) {
|
||||
+ if (!enabled)
|
||||
+ return;
|
||||
+
|
||||
AddCount(value, 1);
|
||||
}
|
||||
|
||||
void SparseHistogram::AddCount(Sample value, int count) {
|
||||
+ if (!enabled)
|
||||
+ return;
|
||||
+
|
||||
if (count <= 0) {
|
||||
NOTREACHED();
|
||||
return;
|
||||
@@ -146,11 +161,17 @@ std::unique_ptr<HistogramSamples> Sparse
|
||||
}
|
||||
|
||||
void SparseHistogram::AddSamples(const HistogramSamples& samples) {
|
||||
+ if (!enabled)
|
||||
+ return;
|
||||
+
|
||||
base::AutoLock auto_lock(lock_);
|
||||
unlogged_samples_->Add(samples);
|
||||
}
|
||||
|
||||
bool SparseHistogram::AddSamplesFromPickle(PickleIterator* iter) {
|
||||
+ if (!enabled)
|
||||
+ return true;
|
||||
+
|
||||
base::AutoLock auto_lock(lock_);
|
||||
return unlogged_samples_->AddFromPickle(iter);
|
||||
}
|
||||
--- a/base/metrics/user_metrics.cc
|
||||
+++ b/base/metrics/user_metrics.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <vector>
|
||||
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/bind.h"
|
||||
+#include "base/command_line.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/location.h"
|
||||
#include "base/macros.h"
|
||||
@@ -24,11 +25,21 @@ LazyInstance<scoped_refptr<SingleThreadT
|
||||
+#include "base/metrics/command_line_handler.h"
|
||||
#include "base/metrics/user_metrics.h"
|
||||
|
||||
#include <stddef.h>
|
||||
@@ -25,10 +26,16 @@ LazyInstance<scoped_refptr<SingleThreadT
|
||||
} // namespace
|
||||
|
||||
+static bool MetricsEnabled() {
|
||||
+ return base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics");
|
||||
+}
|
||||
+
|
||||
void RecordAction(const UserMetricsAction& action) {
|
||||
+ if (!MetricsEnabled())
|
||||
+ return;
|
||||
@@ -248,7 +108,7 @@
|
||||
if (!g_task_runner.Get()) {
|
||||
DCHECK(g_callbacks.Get().empty());
|
||||
return;
|
||||
@@ -46,6 +57,9 @@ void RecordComputedAction(const std::str
|
||||
@@ -46,6 +53,9 @@ void RecordComputedAction(const std::str
|
||||
}
|
||||
|
||||
void AddActionCallback(const ActionCallback& callback) {
|
||||
@@ -258,82 +118,92 @@
|
||||
// Only allow adding a callback if the task runner is set.
|
||||
DCHECK(g_task_runner.Get());
|
||||
DCHECK(g_task_runner.Get()->BelongsToCurrentThread());
|
||||
--- a/components/metrics/metrics_service.cc
|
||||
+++ b/components/metrics/metrics_service.cc
|
||||
@@ -131,6 +131,7 @@
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/callback.h"
|
||||
+#include "base/command_line.h"
|
||||
#include "base/location.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/metrics/histogram_base.h"
|
||||
@@ -815,6 +816,8 @@ bool MetricsService::UmaMetricsProperlyS
|
||||
void MetricsService::RegisterMetricsProvider(
|
||||
std::unique_ptr<MetricsProvider> provider) {
|
||||
DCHECK_EQ(INITIALIZED, state_);
|
||||
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics"))
|
||||
+ return;
|
||||
delegating_provider_.RegisterMetricsProvider(std::move(provider));
|
||||
}
|
||||
|
||||
--- a/chrome/browser/ui/tab_helpers.cc
|
||||
+++ b/chrome/browser/ui/tab_helpers.cc
|
||||
@@ -206,8 +206,10 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/command_line.h"
|
||||
+#include "base/metrics/command_line_handler.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "base/time/default_tick_clock.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -204,8 +205,10 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
ClientHintsObserver::CreateForWebContents(web_contents);
|
||||
ConnectionHelpTabHelper::CreateForWebContents(web_contents);
|
||||
CoreTabHelper::CreateForWebContents(web_contents);
|
||||
- data_use_measurement::DataUseWebContentsObserver::CreateForWebContents(
|
||||
- web_contents);
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics")) {
|
||||
+ if (base::MetricsEnabled()) {
|
||||
+ data_use_measurement::DataUseWebContentsObserver::CreateForWebContents(
|
||||
+ web_contents);
|
||||
+ }
|
||||
ExternalProtocolObserver::CreateForWebContents(web_contents);
|
||||
favicon::CreateContentFaviconDriverForWebContents(web_contents);
|
||||
FindTabHelper::CreateForWebContents(web_contents);
|
||||
@@ -222,13 +224,19 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
@@ -220,13 +223,19 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
HistoryTabHelper::CreateForWebContents(web_contents);
|
||||
InfoBarService::CreateForWebContents(web_contents);
|
||||
InstallableManager::CreateForWebContents(web_contents);
|
||||
- metrics::RendererUptimeWebContentsObserver::CreateForWebContents(
|
||||
- web_contents);
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics")) {
|
||||
+ if (base::MetricsEnabled()) {
|
||||
+ metrics::RendererUptimeWebContentsObserver::CreateForWebContents(
|
||||
+ web_contents);
|
||||
+ }
|
||||
MixedContentSettingsTabHelper::CreateForWebContents(web_contents);
|
||||
NavigationCorrectionTabObserver::CreateForWebContents(web_contents);
|
||||
- NavigationMetricsRecorder::CreateForWebContents(web_contents);
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics")) {
|
||||
+ if (base::MetricsEnabled()) {
|
||||
+ NavigationMetricsRecorder::CreateForWebContents(web_contents);
|
||||
+ }
|
||||
OutOfMemoryReporter::CreateForWebContents(web_contents);
|
||||
- chrome::InitializePageLoadMetricsForWebContents(web_contents);
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics")) {
|
||||
+ if (base::MetricsEnabled()) {
|
||||
+ chrome::InitializePageLoadMetricsForWebContents(web_contents);
|
||||
+ }
|
||||
PDFPluginPlaceholderObserver::CreateForWebContents(web_contents);
|
||||
PermissionRequestManager::CreateForWebContents(web_contents);
|
||||
// The PopupBlockerTabHelper has an implicit dependency on
|
||||
@@ -253,7 +261,9 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
@@ -251,7 +260,9 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
// is taken over by ChromeContentSettingsClient. http://crbug.com/387075
|
||||
TabSpecificContentSettings::CreateForWebContents(web_contents);
|
||||
TabUIHelper::CreateForWebContents(web_contents);
|
||||
- ukm::InitializeSourceUrlRecorderForWebContents(web_contents);
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics")) {
|
||||
+ if (base::MetricsEnabled()) {
|
||||
+ ukm::InitializeSourceUrlRecorderForWebContents(web_contents);
|
||||
+ }
|
||||
vr::VrTabHelper::CreateForWebContents(web_contents);
|
||||
|
||||
// NO! Do not just add your tab helper here. This is a large alphabetized
|
||||
@@ -299,7 +309,8 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
@@ -297,7 +308,9 @@ void TabHelpers::AttachTabHelpers(WebCon
|
||||
|
||||
#if defined(OS_WIN) || defined(OS_MACOSX) || \
|
||||
(defined(OS_LINUX) && !defined(OS_CHROMEOS))
|
||||
- metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents);
|
||||
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("enable-metrics"))
|
||||
+ if (base::MetricsEnabled()) {
|
||||
+ metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents);
|
||||
+ }
|
||||
#endif
|
||||
|
||||
// --- Feature tab helpers behind flags ---
|
||||
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
|
||||
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/logging.h"
|
||||
+#include "base/metrics/command_line_handler.h"
|
||||
#include "base/metrics/field_trial_params.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/metrics/persistent_histogram_allocator.h"
|
||||
@@ -599,6 +600,9 @@ void ChromeMetricsServiceClient::Initial
|
||||
}
|
||||
|
||||
void ChromeMetricsServiceClient::RegisterMetricsServiceProviders() {
|
||||
+ if (!base::MetricsEnabled())
|
||||
+ return;
|
||||
+
|
||||
PrefService* local_state = g_browser_process->local_state();
|
||||
|
||||
// Gets access to persistent metrics shared by sub-processes.
|
||||
|
||||
67
resources/patches/inox-patchset/chromium-arflags.patch
Normal file
67
resources/patches/inox-patchset/chromium-arflags.patch
Normal file
@@ -0,0 +1,67 @@
|
||||
From 2a6309e504376b3f6890df0c1f4d47a1b66866c5 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Wed, 07 Mar 2018 16:10:40 -0800
|
||||
Subject: [PATCH] Format flags for llvm-ar
|
||||
|
||||
We're planning on passing -T to llvm-ar as part of regular builds on Linux.
|
||||
However, llvm-ar is very particular in its syntax. It requires the operation to
|
||||
be specified all in one go like "rcsDT", and forbids "-r -c -s -D -T", "rcsD T",
|
||||
or anything else that has any spaces or dashes. This makes specifying multiple
|
||||
flags like arflags=['D', 'T'] difficult since gn will add spaces between them.
|
||||
This CL fixes the issue in our ar wrapper script to correctly format the flags
|
||||
for llvm-ar. This issue was never seen because arflags is not set anywhere in a
|
||||
Linux build.
|
||||
|
||||
BUG=801925
|
||||
R=thakis
|
||||
|
||||
Change-Id: Idb710052f54487011d6dabc5f30448f78a765515
|
||||
---
|
||||
|
||||
--- a/build/toolchain/gcc_ar_wrapper.py
|
||||
+++ b/build/toolchain/gcc_ar_wrapper.py
|
||||
@@ -25,6 +25,9 @@ def main():
|
||||
required=True,
|
||||
help='The ar binary to run',
|
||||
metavar='PATH')
|
||||
+ parser.add_argument('--arflags',
|
||||
+ required=True,
|
||||
+ help='Flags to pass to ar')
|
||||
parser.add_argument('--output',
|
||||
required=True,
|
||||
help='Output archive file',
|
||||
@@ -34,8 +37,6 @@ def main():
|
||||
parser.add_argument('--resource-whitelist',
|
||||
help='Merge all resource whitelists into a single file.',
|
||||
metavar='PATH')
|
||||
- parser.add_argument('operation',
|
||||
- help='Operation on the archive')
|
||||
parser.add_argument('inputs', nargs='+',
|
||||
help='Input files')
|
||||
args = parser.parse_args()
|
||||
@@ -57,7 +58,13 @@ def main():
|
||||
wrapper_utils.CombineResourceWhitelists(
|
||||
whitelist_candidates, args.resource_whitelist)
|
||||
|
||||
- command = [args.ar] + object_mode + args.operation.split()
|
||||
+ # GNU ar is forgiving with how it handles flags, but llvm-ar is more strict.
|
||||
+ # Something like "ar -r -c -s -D -T libfoo.a foo.o" would work on GNU, but
|
||||
+ # llvm requires "llvm-ar rcsDT libfoo.a foo.o". The latter works on GNU too,
|
||||
+ # so strip spaces and dashes from arflags to handle both cases.
|
||||
+ operation = args.arflags.replace(' ', '').replace('-', '')
|
||||
+
|
||||
+ command = [args.ar] + object_mode + [operation]
|
||||
if args.plugin is not None:
|
||||
command += ['--plugin', args.plugin]
|
||||
command.append(args.output)
|
||||
--- a/build/toolchain/gcc_toolchain.gni
|
||||
+++ b/build/toolchain/gcc_toolchain.gni
|
||||
@@ -348,7 +348,7 @@ template("gcc_toolchain") {
|
||||
|
||||
# Almost all targets build with //build/config/compiler:thin_archive which
|
||||
# adds -T to arflags.
|
||||
- command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" \"{{arflags}} $extra_arflags\" @\"$rspfile\""
|
||||
+ command = "$python_path \"$ar_wrapper\"$whitelist_flag --output={{output}} --ar=\"$ar\" --arflags=\"{{arflags}} $extra_arflags\" @\"$rspfile\""
|
||||
description = "AR {{output}}"
|
||||
rspfile_content = "{{inputs}}"
|
||||
outputs = [
|
||||
@@ -0,0 +1,15 @@
|
||||
# Remove flags not yet implemented in the system compiler's version.
|
||||
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -1387,10 +1387,6 @@ config("default_warnings") {
|
||||
|
||||
# TODO(hans): https://crbug.com/766891
|
||||
"-Wno-null-pointer-arithmetic",
|
||||
-
|
||||
- # Ignore warnings about MSVC optimization pragmas.
|
||||
- # TODO(thakis): Only for no_chromium_code? http://crbug.com/505314
|
||||
- "-Wno-ignored-pragma-optimize",
|
||||
]
|
||||
if (llvm_force_head_revision) {
|
||||
cflags += [
|
||||
@@ -0,0 +1,19 @@
|
||||
# https://chromium.googlesource.com/chromium/src/+/a5252b20a67b9a6882090d963fbd4dc168dd3436%5E%21/
|
||||
# Remove restrictions for enabling Widevine support as the libwidevinecdm.so
|
||||
# component should be able to be installed separately from the browser.
|
||||
|
||||
--- a/third_party/widevine/cdm/BUILD.gn
|
||||
+++ b/third_party/widevine/cdm/BUILD.gn
|
||||
@@ -8,12 +8,6 @@ import("//media/cdm/library_cdm/cdm_path
|
||||
import("//media/media_options.gni")
|
||||
import("//third_party/widevine/cdm/widevine.gni")
|
||||
|
||||
-# Internal Cast builds set enable_widevine=true to bring in Widevine support.
|
||||
-# TODO(xhwang): Support component updated CDM on other platforms and remove this
|
||||
-# assert.
|
||||
-assert(!enable_widevine || is_win || is_mac || is_chromecast,
|
||||
- "Component updated CDM only supported on Windows and Mac for now.")
|
||||
-
|
||||
widevine_arch = current_cpu
|
||||
if (widevine_arch == "x86") {
|
||||
widevine_arch = "ia32"
|
||||
@@ -36,7 +36,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1269,12 +1269,14 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -1285,12 +1285,14 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kUiPartialSwapDescription, kOsAll,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
@@ -51,7 +51,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
{"enable-webrtc-hw-h264-encoding",
|
||||
flag_descriptions::kWebrtcHwH264EncodingName,
|
||||
flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
|
||||
@@ -1588,6 +1590,13 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -1613,6 +1615,13 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
flag_descriptions::kShowTouchHudDescription, kOsCrOS,
|
||||
SINGLE_VALUE_TYPE(ash::switches::kAshTouchHud)},
|
||||
#endif // OS_CHROMEOS
|
||||
@@ -65,7 +65,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
{
|
||||
"disable-accelerated-video-decode",
|
||||
flag_descriptions::kAcceleratedVideoDecodeName,
|
||||
@@ -1595,6 +1604,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -1620,6 +1629,7 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
kOsMac | kOsWin | kOsCrOS | kOsAndroid,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
||||
},
|
||||
@@ -73,7 +73,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
#if defined(OS_WIN)
|
||||
{"enable-hdr", flag_descriptions::kEnableHDRName,
|
||||
flag_descriptions::kEnableHDRDescription, kOsWin,
|
||||
@@ -2318,12 +2328,17 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -2310,12 +2320,17 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
FEATURE_VALUE_TYPE(features::kOpenVR)},
|
||||
#endif // ENABLE_OPENVR
|
||||
#endif // ENABLE_VR
|
||||
@@ -117,8 +117,8 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
+#endif
|
||||
::switches::kDisableBlinkFeatures,
|
||||
::switches::kDisableCastStreamingHWEncoding,
|
||||
::switches::kDisableDistanceFieldText,
|
||||
@@ -163,7 +169,7 @@ void DeriveCommandLine(const GURL& start
|
||||
::switches::kDisableGpu,
|
||||
@@ -162,7 +168,7 @@ void DeriveCommandLine(const GURL& start
|
||||
::switches::kDisableWebGLImageChromium,
|
||||
::switches::kEnableWebGLImageChromium,
|
||||
::switches::kEnableWebVR,
|
||||
@@ -143,7 +143,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
|
||||
const char kAcceleratedVideoDecodeDescription[] =
|
||||
"Hardware-accelerated video decode where available.";
|
||||
@@ -1730,6 +1737,7 @@ const char kWebrtcEchoCanceller3Name[] =
|
||||
@@ -1742,6 +1749,7 @@ const char kWebrtcEchoCanceller3Name[] =
|
||||
const char kWebrtcEchoCanceller3Description[] =
|
||||
"Experimental WebRTC echo canceller (AEC3).";
|
||||
|
||||
@@ -151,7 +151,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
|
||||
const char kWebrtcHwDecodingDescription[] =
|
||||
"Support in WebRTC for decoding video streams using platform hardware.";
|
||||
@@ -1737,6 +1745,7 @@ const char kWebrtcHwDecodingDescription[
|
||||
@@ -1749,6 +1757,7 @@ const char kWebrtcHwDecodingDescription[
|
||||
const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
|
||||
const char kWebrtcHwEncodingDescription[] =
|
||||
"Support in WebRTC for encoding video streams using platform hardware.";
|
||||
@@ -159,7 +159,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
|
||||
const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
|
||||
const char kWebrtcHwH264EncodingDescription[] =
|
||||
@@ -2561,14 +2570,16 @@ const char kTabStripKeyboardFocusDescrip
|
||||
@@ -2590,14 +2599,16 @@ const char kTabStripKeyboardFocusDescrip
|
||||
|
||||
// Chrome OS -------------------------------------------------------------------
|
||||
|
||||
@@ -190,7 +190,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
extern const char kAcceleratedVideoDecodeName[];
|
||||
extern const char kAcceleratedVideoDecodeDescription[];
|
||||
|
||||
@@ -1569,13 +1573,17 @@ extern const char kPermissionPromptPersi
|
||||
@@ -1589,13 +1593,17 @@ extern const char kPermissionPromptPersi
|
||||
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
@@ -213,10 +213,10 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
|
||||
--- a/content/browser/gpu/compositor_util.cc
|
||||
+++ b/content/browser/gpu/compositor_util.cc
|
||||
@@ -99,7 +99,11 @@ const GpuFeatureData GetGpuFeatureData(s
|
||||
@@ -124,7 +124,11 @@ const GpuFeatureData GetGpuFeatureData(s
|
||||
{"video_decode",
|
||||
manager->GetFeatureStatus(
|
||||
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
|
||||
SafeGetFeatureStatus(manager,
|
||||
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
|
||||
+#else
|
||||
@@ -227,7 +227,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
true},
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -132,7 +132,7 @@ static const char* const kSwitchNames[]
|
||||
@@ -134,7 +134,7 @@ static const char* const kSwitchNames[]
|
||||
switches::kDisableGLExtensions,
|
||||
switches::kDisableLogging,
|
||||
switches::kDisableShaderNameHashing,
|
||||
@@ -238,7 +238,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
#if defined(OS_WIN)
|
||||
--- a/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||
+++ b/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||
@@ -163,8 +163,13 @@ class VideoCaptureBrowserTest : public C
|
||||
@@ -164,8 +164,13 @@ class VideoCaptureBrowserTest : public C
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
switches::kUseFakeJpegDecodeAccelerator);
|
||||
} else {
|
||||
@@ -282,7 +282,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
return;
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2525,7 +2525,11 @@ void RenderProcessHostImpl::PropagateBro
|
||||
@@ -2699,7 +2699,11 @@ void RenderProcessHostImpl::PropagateBro
|
||||
switches::kDefaultTileHeight,
|
||||
switches::kDisable2dCanvasImageChromium,
|
||||
switches::kDisableAcceleratedJpegDecoding,
|
||||
@@ -291,10 +291,10 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
+#else
|
||||
switches::kDisableAcceleratedVideoDecode,
|
||||
+#endif
|
||||
switches::kDisableBackgroundTasks,
|
||||
switches::kDisableBackgroundTimerThrottling,
|
||||
switches::kDisableBreakpad,
|
||||
switches::kDisableCompositorUkmForTests,
|
||||
@@ -2660,8 +2664,10 @@ void RenderProcessHostImpl::PropagateBro
|
||||
@@ -2837,8 +2841,10 @@ void RenderProcessHostImpl::PropagateBro
|
||||
switches::kDisableMojoRenderer,
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
@@ -307,7 +307,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
switches::kEnableWebRtcStunOrigin,
|
||||
--- a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
|
||||
+++ b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
|
||||
@@ -58,7 +58,12 @@ class WebRtcMediaRecorderTest
|
||||
@@ -66,7 +66,12 @@ class MAYBE_WebRtcMediaRecorderTest
|
||||
return;
|
||||
// This flag is also used for encoding, https://crbug.com/616640.
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
@@ -405,7 +405,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
// Disables hardware acceleration of video decode, where available.
|
||||
const char kDisableAcceleratedVideoDecode[] =
|
||||
"disable-accelerated-video-decode";
|
||||
@@ -859,11 +868,13 @@ const char kZygoteProcess[]
|
||||
@@ -867,11 +876,13 @@ const char kZygoteProcess[]
|
||||
// ignores this switch on its stable and beta channels.
|
||||
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
|
||||
|
||||
@@ -433,7 +433,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
|
||||
CONTENT_EXPORT extern const char kDisableAcceleratedVideoEncode[];
|
||||
CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
|
||||
@@ -106,6 +110,9 @@ CONTENT_EXPORT extern const char kDisabl
|
||||
@@ -107,6 +111,9 @@ CONTENT_EXPORT extern const char kDisabl
|
||||
CONTENT_EXPORT extern const char kDomAutomationController[];
|
||||
extern const char kDisable2dCanvasClipAntialiasing[];
|
||||
CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
|
||||
@@ -443,7 +443,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
|
||||
CONTENT_EXPORT extern const char kEnableAutomation[];
|
||||
CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
|
||||
@@ -240,8 +247,10 @@ CONTENT_EXPORT extern const char kZygote
|
||||
@@ -242,8 +249,10 @@ CONTENT_EXPORT extern const char kZygote
|
||||
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
|
||||
@@ -456,7 +456,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
|
||||
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||
@@ -282,10 +282,18 @@ void PeerConnectionDependencyFactory::In
|
||||
@@ -276,10 +276,18 @@ void PeerConnectionDependencyFactory::In
|
||||
|
||||
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
|
||||
if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
|
||||
@@ -477,9 +477,9 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1581,7 +1581,11 @@ media::GpuVideoAcceleratorFactories* Ren
|
||||
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
|
||||
GetMediaThreadTaskRunner();
|
||||
@@ -1578,7 +1578,11 @@ media::GpuVideoAcceleratorFactories* Ren
|
||||
kGpuStreamIdMedia, kGpuStreamPriorityMedia);
|
||||
|
||||
const bool enable_video_accelerator =
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ cmd_line->HasSwitch(switches::kEnableAcceleratedVideo) &&
|
||||
@@ -491,7 +491,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
gpu::kGpuFeatureStatusEnabled);
|
||||
--- a/gpu/config/software_rendering_list.json
|
||||
+++ b/gpu/config/software_rendering_list.json
|
||||
@@ -373,17 +373,6 @@
|
||||
@@ -377,17 +377,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -511,7 +511,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
"cr_bugs": [145531, 332596, 571899, 629434],
|
||||
--- a/media/gpu/BUILD.gn
|
||||
+++ b/media/gpu/BUILD.gn
|
||||
@@ -482,6 +482,14 @@ if (use_v4l2_codec || use_vaapi || is_ma
|
||||
@@ -491,6 +491,14 @@ if (use_v4l2_codec || use_vaapi || is_ma
|
||||
}
|
||||
}
|
||||
|
||||
@@ -526,7 +526,7 @@ Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
if (use_vaapi) {
|
||||
test("jpeg_encode_accelerator_unittest") {
|
||||
deps = [
|
||||
@@ -542,6 +550,10 @@ if (use_v4l2_codec || use_vaapi) {
|
||||
@@ -551,6 +559,10 @@ if (use_v4l2_codec || use_vaapi) {
|
||||
if (use_ozone) {
|
||||
deps += [ "//ui/ozone" ]
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
From f15e8b573ada0fcd643ae393484214b1c7c940f8 Mon Sep 17 00:00:00 2001
|
||||
From: Evangelos Foutras <evangelos@foutrelis.com>
|
||||
Date: Sat, 24 Mar 2018 00:04:33 +0000
|
||||
Subject: [PATCH] Fix crash in is_cfi=true builds with unbundled ICU
|
||||
|
||||
Ensure ICU symbols have public visibility and are thus excluded from CFI
|
||||
checks and whole-program optimization. The former caused a startup crash
|
||||
and the latter has the potential to break virtual calls in weird ways.
|
||||
|
||||
BUG=822820
|
||||
|
||||
Change-Id: Ia809eefcb9e93b3c612f2381d394db83bbc67120
|
||||
Reviewed-on: https://chromium-review.googlesource.com/978008
|
||||
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
|
||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#545638}
|
||||
---
|
||||
build/linux/unbundle/icu.gn | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
--- a/build/linux/unbundle/icu.gn
|
||||
+++ b/build/linux/unbundle/icu.gn
|
||||
@@ -17,6 +17,24 @@ config("icu_config") {
|
||||
"USING_SYSTEM_ICU=1",
|
||||
"ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC",
|
||||
"UCHAR_TYPE=uint16_t",
|
||||
+
|
||||
+ # U_EXPORT (defined in unicode/platform.h) is used to set public visibility
|
||||
+ # on classes through the U_COMMON_API and U_I18N_API macros (among others).
|
||||
+ # When linking against the system ICU library, we want its symbols to have
|
||||
+ # public LTO visibility. This disables CFI checks for the ICU classes and
|
||||
+ # allows whole-program optimization to be applied to the rest of Chromium.
|
||||
+ #
|
||||
+ # Both U_COMMON_API and U_I18N_API macros would be defined to U_EXPORT only
|
||||
+ # when U_COMBINED_IMPLEMENTATION is defined (see unicode/utypes.h). Because
|
||||
+ # we override the default system UCHAR_TYPE (char16_t), it is not possible
|
||||
+ # to use U_COMBINED_IMPLEMENTATION at this moment, meaning the U_COMMON_API
|
||||
+ # and U_I18N_API macros are set to U_IMPORT which is an empty definition.
|
||||
+ #
|
||||
+ # Until building with UCHAR_TYPE=char16_t is supported, one way to apply
|
||||
+ # public visibility (and thus public LTO visibility) to all ICU classes is
|
||||
+ # to define U_IMPORT to have the same value as U_EXPORT. For more details,
|
||||
+ # please see: https://crbug.com/822820
|
||||
+ "U_IMPORT=U_EXPORT",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
From 7ef426c221d11b53b6de507b398e35e8d7b3cc94 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Wed, 4 Apr 2018 01:23:26 +0000
|
||||
Subject: [PATCH] Fix frame buttons rendering too large when using
|
||||
OSX-Arc-White GTK theme
|
||||
|
||||
The check for GTK 3.20 was incorrect as the issue it was trying to fix
|
||||
was still occurring on GTK 3.20+ systems. This CL adds the correct,
|
||||
but more complex, check.
|
||||
|
||||
Verified on these configurations:
|
||||
{GTK 3.18, GTK 3.22} X
|
||||
{Breeze, Adwaita, OSX-Arc-White, Greybird} X
|
||||
{scale=1, scale=2} X
|
||||
{fullscreen, restored}
|
||||
|
||||
BUG=821881
|
||||
R=thestig
|
||||
|
||||
Change-Id: I05afa35c1452a46a1abf4c39191a13657bfd8e2c
|
||||
Reviewed-on: https://chromium-review.googlesource.com/990717
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#547921}
|
||||
---
|
||||
chrome/browser/ui/libgtkui/nav_button_provider_gtk3.cc | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/chrome/browser/ui/libgtkui/nav_button_provider_gtk3.cc
|
||||
+++ b/chrome/browser/ui/libgtkui/nav_button_provider_gtk3.cc
|
||||
@@ -213,7 +213,23 @@ class NavButtonImageSource : public gfx:
|
||||
// is not scaled for the (unexpected) smaller button size, and the button's
|
||||
// edges appear cut off. To fix this, manually set the background to scale
|
||||
// to the button size when it would have clipped.
|
||||
- if (GtkVersionCheck(3, 20)) {
|
||||
+ //
|
||||
+ // GTK's "contain" is unlike CSS's "contain". In CSS, the image would only
|
||||
+ // be downsized when it would have clipped. In GTK, the image is always
|
||||
+ // scaled to fit the drawing region (preserving aspect ratio). Only add
|
||||
+ // "contain" if clipping would occur.
|
||||
+ cairo_pattern_t* cr_pattern = nullptr;
|
||||
+ cairo_surface_t* cr_surface = nullptr;
|
||||
+ gtk_style_context_get(button_context, button_state,
|
||||
+ GTK_STYLE_PROPERTY_BACKGROUND_IMAGE, &cr_pattern,
|
||||
+ nullptr);
|
||||
+ if (cr_pattern &&
|
||||
+ cairo_pattern_get_surface(cr_pattern, &cr_surface) ==
|
||||
+ CAIRO_STATUS_SUCCESS &&
|
||||
+ cr_surface &&
|
||||
+ cairo_surface_get_type(cr_surface) == CAIRO_SURFACE_TYPE_IMAGE &&
|
||||
+ (cairo_image_surface_get_width(cr_surface) > button_size_.width() ||
|
||||
+ cairo_image_surface_get_height(cr_surface) > button_size_.height())) {
|
||||
ApplyCssToContext(button_context,
|
||||
".titlebutton { background-size: contain; }");
|
||||
}
|
||||
@@ -95,7 +95,7 @@ by default.
|
||||
// creates and uses to publish OEM default apps to the extensions system.
|
||||
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
|
||||
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_drive.cc
|
||||
@@ -1129,7 +1129,7 @@ void FileManagerPrivateInternalGetDownlo
|
||||
@@ -1173,7 +1173,7 @@ void FileManagerPrivateInternalGetDownlo
|
||||
SigninManagerFactory::GetForProfile(GetProfile());
|
||||
const std::string& account_id = signin_manager->GetAuthenticatedAccountId();
|
||||
std::vector<std::string> scopes;
|
||||
@@ -106,7 +106,7 @@ by default.
|
||||
new google_apis::AuthService(oauth2_token_service,
|
||||
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
|
||||
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
|
||||
@@ -65,7 +65,7 @@ namespace {
|
||||
@@ -66,7 +66,7 @@ namespace {
|
||||
|
||||
using api::file_manager_private::ProfileInfo;
|
||||
|
||||
@@ -152,7 +152,7 @@ by default.
|
||||
const int kDownloadsLowSpaceWarningHelpNumber = 1061547;
|
||||
--- a/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc
|
||||
+++ b/chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc
|
||||
@@ -27,8 +27,8 @@ namespace {
|
||||
@@ -26,8 +26,8 @@ namespace {
|
||||
|
||||
const char kGoogleDotCom[] = "google.com";
|
||||
constexpr const char* kGoogleGstaticAppIds[] = {
|
||||
@@ -242,7 +242,7 @@ by default.
|
||||
|
||||
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
|
||||
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
|
||||
@@ -72,9 +72,9 @@ const int ClientSideDetectionService::kN
|
||||
@@ -71,9 +71,9 @@ const int ClientSideDetectionService::kN
|
||||
const int ClientSideDetectionService::kPositiveCacheIntervalMinutes = 30;
|
||||
|
||||
const char ClientSideDetectionService::kClientReportPhishingUrl[] =
|
||||
@@ -253,10 +253,10 @@ by default.
|
||||
+ "trk:149:https://sb-ssl.google.com/safebrowsing/clientreport/malware-check";
|
||||
|
||||
struct ClientSideDetectionService::ClientPhishingReportInfo {
|
||||
std::unique_ptr<net::URLFetcher> fetcher;
|
||||
std::unique_ptr<network::SimpleURLLoader> loader;
|
||||
--- a/chrome/browser/safe_browsing/download_protection/download_feedback.cc
|
||||
+++ b/chrome/browser/safe_browsing/download_protection/download_feedback.cc
|
||||
@@ -230,7 +230,7 @@ const int64_t DownloadFeedback::kMaxUplo
|
||||
@@ -231,7 +231,7 @@ const int64_t DownloadFeedback::kMaxUplo
|
||||
|
||||
// static
|
||||
const char DownloadFeedback::kSbFeedbackURL[] =
|
||||
@@ -267,7 +267,7 @@ by default.
|
||||
DownloadFeedbackFactory* DownloadFeedback::factory_ = nullptr;
|
||||
--- a/chrome/browser/safe_search_api/safe_search_url_checker.cc
|
||||
+++ b/chrome/browser/safe_search_api/safe_search_url_checker.cc
|
||||
@@ -33,7 +33,7 @@ using net::URLRequestStatus;
|
||||
@@ -32,7 +32,7 @@ using net::URLRequestStatus;
|
||||
namespace {
|
||||
|
||||
const char kSafeSearchApiUrl[] =
|
||||
@@ -278,18 +278,18 @@ by default.
|
||||
|
||||
--- a/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc
|
||||
@@ -237,7 +237,7 @@ void SpellcheckHunspellDictionary::OnURL
|
||||
@@ -257,7 +257,7 @@ GURL SpellcheckHunspellDictionary::GetDi
|
||||
DCHECK(!bdict_file.empty());
|
||||
|
||||
GURL SpellcheckHunspellDictionary::GetDictionaryURL() {
|
||||
static const char kDownloadServerUrl[] =
|
||||
- "https://redirector.gvt1.com/edgedl/chrome/dict/";
|
||||
+ "trk:173:https://redirector.gvt1.com/edgedl/chrome/dict/";
|
||||
std::string bdict_file = dictionary_file_.path.BaseName().MaybeAsASCII();
|
||||
|
||||
DCHECK(!bdict_file.empty());
|
||||
return GURL(std::string(kDownloadServerUrl) +
|
||||
base::ToLowerASCII(bdict_file));
|
||||
--- a/chrome/browser/supervised_user/supervised_user_service.cc
|
||||
+++ b/chrome/browser/supervised_user/supervised_user_service.cc
|
||||
@@ -103,7 +103,7 @@ namespace {
|
||||
@@ -102,7 +102,7 @@ namespace {
|
||||
|
||||
// The URL from which to download a host blacklist if no local one exists yet.
|
||||
const char kBlacklistURL[] =
|
||||
@@ -400,7 +400,7 @@ by default.
|
||||
}
|
||||
--- a/chromecast/browser/service/cast_service_simple.cc
|
||||
+++ b/chromecast/browser/service/cast_service_simple.cc
|
||||
@@ -25,7 +25,7 @@ GURL GetStartupURL() {
|
||||
@@ -26,7 +26,7 @@ GURL GetStartupURL() {
|
||||
const base::CommandLine::StringVector& args = command_line->GetArgs();
|
||||
|
||||
if (args.empty())
|
||||
@@ -590,7 +590,7 @@ by default.
|
||||
|
||||
--- a/components/policy/resources/policy_templates.json
|
||||
+++ b/components/policy/resources/policy_templates.json
|
||||
@@ -2709,7 +2709,7 @@
|
||||
@@ -2718,7 +2718,7 @@
|
||||
'dynamic_refresh': True,
|
||||
'per_profile': True,
|
||||
},
|
||||
@@ -599,7 +599,7 @@ by default.
|
||||
'id': 34,
|
||||
'caption': '''Configure the list of force-installed apps and extensions''',
|
||||
'tags': ['full-admin-access'],
|
||||
@@ -6061,7 +6061,7 @@
|
||||
@@ -6102,7 +6102,7 @@
|
||||
'features': {
|
||||
'dynamic_refresh': True,
|
||||
},
|
||||
@@ -610,7 +610,7 @@ by default.
|
||||
'tags': [],
|
||||
--- a/components/rappor/rappor_service_impl.cc
|
||||
+++ b/components/rappor/rappor_service_impl.cc
|
||||
@@ -30,7 +30,7 @@ const char kMimeType[] = "application/vn
|
||||
@@ -31,7 +31,7 @@ const char kMimeType[] = "application/vn
|
||||
const char kRapporDailyEventHistogram[] = "Rappor.DailyEvent.IntervalType";
|
||||
|
||||
// The rappor server's URL.
|
||||
@@ -729,7 +729,7 @@ by default.
|
||||
const char kGaiaSid[] = "sid";
|
||||
--- a/google_apis/gaia/google_service_auth_error.cc
|
||||
+++ b/google_apis/gaia/google_service_auth_error.cc
|
||||
@@ -253,7 +253,7 @@ std::string GoogleServiceAuthError::ToSt
|
||||
@@ -211,7 +211,7 @@ std::string GoogleServiceAuthError::ToSt
|
||||
case WEB_LOGIN_REQUIRED:
|
||||
return "Less secure apps may not authenticate with this account. "
|
||||
"Please visit: "
|
||||
|
||||
@@ -9,9 +9,9 @@ very interesting in themselves. Force them to be stored.
|
||||
components/mime_util/mime_util.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/third_party/WebKit/common/mime_util/mime_util.cc
|
||||
+++ b/third_party/WebKit/common/mime_util/mime_util.cc
|
||||
@@ -75,6 +75,7 @@ static const char* const kUnsupportedTex
|
||||
--- a/third_party/blink/common/mime_util/mime_util.cc
|
||||
+++ b/third_party/blink/common/mime_util/mime_util.cc
|
||||
@@ -76,6 +76,7 @@ static const char* const kUnsupportedTex
|
||||
"text/x-csv",
|
||||
"text/x-vcf",
|
||||
"text/rtf",
|
||||
|
||||
@@ -13,23 +13,29 @@ This prevents trk:148 (phishing) and trk:149 (malware).
|
||||
|
||||
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
|
||||
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
|
||||
@@ -63,12 +63,6 @@ namespace {
|
||||
REPORT_RESULT_MAX
|
||||
};
|
||||
@@ -62,12 +62,6 @@ enum MalwareReportTypes {
|
||||
REPORT_RESULT_MAX
|
||||
};
|
||||
|
||||
- void UpdateEnumUMAHistogram(MalwareReportTypes report_type) {
|
||||
- DCHECK(report_type >= 0 && report_type < REPORT_RESULT_MAX);
|
||||
- UMA_HISTOGRAM_ENUMERATION("SBClientMalware.SentReports",
|
||||
- report_type, REPORT_RESULT_MAX);
|
||||
- }
|
||||
-void UpdateEnumUMAHistogram(MalwareReportTypes report_type) {
|
||||
- DCHECK(report_type >= 0 && report_type < REPORT_RESULT_MAX);
|
||||
- UMA_HISTOGRAM_ENUMERATION("SBClientMalware.SentReports", report_type,
|
||||
- REPORT_RESULT_MAX);
|
||||
-}
|
||||
-
|
||||
} // namespace
|
||||
|
||||
const int ClientSideDetectionService::kInitialClientModelFetchDelayMs = 10000;
|
||||
@@ -282,83 +276,8 @@ void ClientSideDetectionService::StartCl
|
||||
return;
|
||||
}
|
||||
@@ -277,90 +271,9 @@ void ClientSideDetectionService::StartCl
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
std::unique_ptr<ClientPhishingRequest> request(verdict);
|
||||
|
||||
- if (!enabled_) {
|
||||
- if (!callback.is_null())
|
||||
- callback.Run(GURL(request->url()), false);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- // Fill in metadata about which model we used.
|
||||
- if (is_extended_reporting) {
|
||||
- request->set_model_filename(model_loader_extended_->name());
|
||||
@@ -39,7 +45,9 @@ This prevents trk:148 (phishing) and trk:149 (malware).
|
||||
- request->set_model_filename(model_loader_standard_->name());
|
||||
- request->mutable_population()->set_user_population(
|
||||
- ChromeUserPopulation::SAFE_BROWSING);
|
||||
- }
|
||||
+ if (!callback.is_null())
|
||||
+ callback.Run(GURL(request->url()), false);
|
||||
}
|
||||
- DVLOG(2) << "Starting report for hit on model " << request->model_filename();
|
||||
-
|
||||
- std::string request_data;
|
||||
@@ -86,36 +94,41 @@ This prevents trk:148 (phishing) and trk:149 (malware).
|
||||
- }
|
||||
- }
|
||||
- })");
|
||||
- std::unique_ptr<net::URLFetcher> fetcher(net::URLFetcher::Create(
|
||||
- 0 /* ID used for testing */, GetClientReportUrl(kClientReportPhishingUrl),
|
||||
- net::URLFetcher::POST, this, traffic_annotation));
|
||||
- net::URLFetcher* fetcher_ptr = fetcher.get();
|
||||
- data_use_measurement::DataUseUserData::AttachToFetcher(
|
||||
- fetcher_ptr, data_use_measurement::DataUseUserData::SAFE_BROWSING);
|
||||
- auto resource_request = std::make_unique<network::ResourceRequest>();
|
||||
- resource_request->url = GetClientReportUrl(kClientReportPhishingUrl);
|
||||
- resource_request->method = "POST";
|
||||
- resource_request->load_flags = net::LOAD_DISABLE_CACHE;
|
||||
- auto loader = network::SimpleURLLoader::Create(std::move(resource_request),
|
||||
- traffic_annotation);
|
||||
- loader->AttachStringForUpload(request_data, "application/octet-stream");
|
||||
- loader->DownloadToStringOfUnboundedSizeUntilCrashAndDie(
|
||||
- url_loader_factory_.get(),
|
||||
- base::BindOnce(&ClientSideDetectionService::OnURLLoaderComplete,
|
||||
- base::Unretained(this), loader.get()));
|
||||
-
|
||||
- // Remember which callback and URL correspond to the current fetcher object.
|
||||
- std::unique_ptr<ClientPhishingReportInfo> info(new ClientPhishingReportInfo);
|
||||
- info->fetcher = std::move(fetcher);
|
||||
- auto* loader_ptr = loader.get();
|
||||
- info->loader = std::move(loader);
|
||||
- info->callback = callback;
|
||||
- info->phishing_url = GURL(request->url());
|
||||
- client_phishing_reports_[fetcher_ptr] = std::move(info);
|
||||
-
|
||||
- fetcher_ptr->SetLoadFlags(net::LOAD_DISABLE_CACHE);
|
||||
- fetcher_ptr->SetRequestContext(request_context_getter_.get());
|
||||
- fetcher_ptr->SetUploadData("application/octet-stream", request_data);
|
||||
- fetcher_ptr->Start();
|
||||
- client_phishing_reports_[loader_ptr] = std::move(info);
|
||||
-
|
||||
- // Record that we made a request
|
||||
- phishing_report_times_.push(base::Time::Now());
|
||||
+ if (!callback.is_null())
|
||||
+ callback.Run(GURL(request->url()), false);
|
||||
}
|
||||
|
||||
void ClientSideDetectionService::StartClientReportMalwareRequest(
|
||||
@@ -373,74 +292,8 @@ void ClientSideDetectionService::StartCl
|
||||
return;
|
||||
}
|
||||
@@ -369,81 +282,8 @@ void ClientSideDetectionService::StartCl
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
std::unique_ptr<ClientMalwareRequest> request(verdict);
|
||||
|
||||
- if (!enabled_) {
|
||||
- if (!callback.is_null())
|
||||
- callback.Run(GURL(request->url()), GURL(request->url()), false);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- std::string request_data;
|
||||
- if (!request->SerializeToString(&request_data)) {
|
||||
- UpdateEnumUMAHistogram(REPORT_FAILED_SERIALIZATION);
|
||||
@@ -157,27 +170,28 @@ This prevents trk:148 (phishing) and trk:149 (malware).
|
||||
- }
|
||||
- }
|
||||
- })");
|
||||
- std::unique_ptr<net::URLFetcher> fetcher(net::URLFetcher::Create(
|
||||
- 0 /* ID used for testing */, GetClientReportUrl(kClientReportMalwareUrl),
|
||||
- net::URLFetcher::POST, this, traffic_annotation));
|
||||
- net::URLFetcher* fetcher_ptr = fetcher.get();
|
||||
- data_use_measurement::DataUseUserData::AttachToFetcher(
|
||||
- fetcher_ptr, data_use_measurement::DataUseUserData::SAFE_BROWSING);
|
||||
- auto resource_request = std::make_unique<network::ResourceRequest>();
|
||||
- resource_request->url = GetClientReportUrl(kClientReportMalwareUrl);
|
||||
- resource_request->method = "POST";
|
||||
- resource_request->load_flags = net::LOAD_DISABLE_CACHE;
|
||||
- auto loader = network::SimpleURLLoader::Create(std::move(resource_request),
|
||||
- traffic_annotation);
|
||||
- loader->AttachStringForUpload(request_data, "application/octet-stream");
|
||||
- loader->DownloadToStringOfUnboundedSizeUntilCrashAndDie(
|
||||
- url_loader_factory_.get(),
|
||||
- base::BindOnce(&ClientSideDetectionService::OnURLLoaderComplete,
|
||||
- base::Unretained(this), loader.get()));
|
||||
-
|
||||
- // Remember which callback and URL correspond to the current fetcher object.
|
||||
- std::unique_ptr<ClientMalwareReportInfo> info(new ClientMalwareReportInfo);
|
||||
- info->fetcher = std::move(fetcher);
|
||||
- auto* loader_ptr = loader.get();
|
||||
- info->loader = std::move(loader);
|
||||
- info->callback = callback;
|
||||
- info->original_url = GURL(request->url());
|
||||
- client_malware_reports_[fetcher_ptr] = std::move(info);
|
||||
- client_malware_reports_[loader_ptr] = std::move(info);
|
||||
-
|
||||
- fetcher_ptr->SetLoadFlags(net::LOAD_DISABLE_CACHE);
|
||||
- fetcher_ptr->SetRequestContext(request_context_getter_.get());
|
||||
- fetcher_ptr->SetUploadData("application/octet-stream", request_data);
|
||||
- fetcher_ptr->Start();
|
||||
-
|
||||
- UMA_HISTOGRAM_ENUMERATION("SBClientMalware.SentReports",
|
||||
- REPORT_SENT, REPORT_RESULT_MAX);
|
||||
- UMA_HISTOGRAM_ENUMERATION("SBClientMalware.SentReports", REPORT_SENT,
|
||||
- REPORT_RESULT_MAX);
|
||||
-
|
||||
- UMA_HISTOGRAM_COUNTS("SBClientMalware.IPBlacklistRequestPayloadSize",
|
||||
- request_data.size());
|
||||
@@ -188,4 +202,4 @@ This prevents trk:148 (phishing) and trk:149 (malware).
|
||||
+ callback.Run(GURL(request->url()), GURL(request->url()), false);
|
||||
}
|
||||
|
||||
|
||||
void ClientSideDetectionService::HandlePhishingVerdict(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1224,6 +1224,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -1243,6 +1243,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
"Enable stacking in tab strip",
|
||||
"Forces tabs to be stacked in the tab strip. Otherwise, they follow default behavior.",
|
||||
kOsAll, SINGLE_VALUE_TYPE("enable-stacked-tab-strip")},
|
||||
@@ -15,7 +15,7 @@
|
||||
"Record histograms and user actions.",
|
||||
--- a/chrome/renderer/chrome_render_frame_observer.cc
|
||||
+++ b/chrome/renderer/chrome_render_frame_observer.cc
|
||||
@@ -141,9 +141,10 @@ ChromeRenderFrameObserver::ChromeRenderF
|
||||
@@ -146,9 +146,10 @@ ChromeRenderFrameObserver::ChromeRenderF
|
||||
if (!render_frame->IsMainFrame())
|
||||
return;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if (!command_line.HasSwitch(switches::kDisableClientSidePhishingDetection))
|
||||
SetClientSidePhishingDetection(true);
|
||||
#endif
|
||||
@@ -328,14 +329,16 @@ void ChromeRenderFrameObserver::DidFinis
|
||||
@@ -333,14 +334,16 @@ void ChromeRenderFrameObserver::DidFinis
|
||||
if (frame->Parent())
|
||||
return;
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
--- a/chrome/renderer/chrome_render_frame_observer.h
|
||||
+++ b/chrome/renderer/chrome_render_frame_observer.h
|
||||
@@ -98,6 +98,7 @@ class ChromeRenderFrameObserver : public
|
||||
@@ -99,6 +99,7 @@ class ChromeRenderFrameObserver : public
|
||||
// Have the same lifetime as us.
|
||||
translate::TranslateHelper* translate_helper_;
|
||||
safe_browsing::PhishingClassifierDelegate* phishing_classifier_;
|
||||
@@ -77,7 +77,7 @@
|
||||
} // namespace
|
||||
|
||||
// TemplateURLService::LessWithPrefix -----------------------------------------
|
||||
@@ -232,6 +238,7 @@ TemplateURLService::TemplateURLService(
|
||||
@@ -279,6 +285,7 @@ TemplateURLService::TemplateURLService(
|
||||
rappor::RapporServiceImpl* rappor_service,
|
||||
const base::Closure& dsp_change_callback)
|
||||
: prefs_(prefs),
|
||||
@@ -85,7 +85,7 @@
|
||||
search_terms_data_(std::move(search_terms_data)),
|
||||
web_data_service_(web_data_service),
|
||||
client_(std::move(client)),
|
||||
@@ -260,6 +267,7 @@ TemplateURLService::TemplateURLService(
|
||||
@@ -309,6 +316,7 @@ TemplateURLService::TemplateURLService(
|
||||
TemplateURLService::TemplateURLService(const Initializer* initializers,
|
||||
const int count)
|
||||
: prefs_(nullptr),
|
||||
@@ -93,7 +93,7 @@
|
||||
search_terms_data_(new SearchTermsData),
|
||||
web_data_service_(nullptr),
|
||||
google_url_tracker_(nullptr),
|
||||
@@ -314,7 +322,7 @@ bool TemplateURLService::CanAddAutogener
|
||||
@@ -365,7 +373,7 @@ bool TemplateURLService::CanAddAutogener
|
||||
if (existing_url) {
|
||||
// We already have a TemplateURL for this keyword. Only allow it to be
|
||||
// replaced if the TemplateURL can be replaced.
|
||||
@@ -102,7 +102,7 @@
|
||||
}
|
||||
|
||||
// We don't have a TemplateURL with keyword. We still may not allow this
|
||||
@@ -323,8 +331,8 @@ bool TemplateURLService::CanAddAutogener
|
||||
@@ -374,8 +382,8 @@ bool TemplateURLService::CanAddAutogener
|
||||
// that may interfere with search queries). An easy heuristic for this is
|
||||
// whether the user has a TemplateURL that has been manually modified (e.g.,
|
||||
// renamed) connected to the same host.
|
||||
@@ -113,7 +113,7 @@
|
||||
}
|
||||
|
||||
bool TemplateURLService::IsPrepopulatedOrCreatedByPolicy(
|
||||
@@ -1285,6 +1293,8 @@ SyncDataMap TemplateURLService::CreateGU
|
||||
@@ -1351,6 +1359,8 @@ SyncDataMap TemplateURLService::CreateGU
|
||||
|
||||
void TemplateURLService::Init(const Initializer* initializers,
|
||||
int num_initializers) {
|
||||
@@ -122,18 +122,17 @@
|
||||
if (client_)
|
||||
client_->SetOwner(this);
|
||||
|
||||
@@ -1516,16 +1526,17 @@ bool TemplateURLService::CanAddAutogener
|
||||
@@ -1583,6 +1593,9 @@ void TemplateURLService::ChangeToLoadedS
|
||||
|
||||
bool TemplateURLService::CanAddAutogeneratedKeywordForHost(
|
||||
const std::string& host) const {
|
||||
+ if (!should_autocollect_)
|
||||
+ return false;
|
||||
+
|
||||
const TemplateURLSet* urls = provider_map_->GetURLsForHost(host);
|
||||
if (!urls)
|
||||
- return true;
|
||||
+ return should_autocollect_;
|
||||
for (TemplateURLSet::const_iterator i(urls->begin()); i != urls->end(); ++i) {
|
||||
if (!(*i)->safe_for_autoreplace())
|
||||
return false;
|
||||
}
|
||||
- return true;
|
||||
+ return should_autocollect_;
|
||||
return true;
|
||||
@@ -1593,7 +1606,8 @@ bool TemplateURLService::CanAddAutogener
|
||||
}
|
||||
|
||||
bool TemplateURLService::CanReplace(const TemplateURL* t_url) const {
|
||||
@@ -145,7 +144,7 @@
|
||||
TemplateURL* TemplateURLService::FindNonExtensionTemplateURLForKeyword(
|
||||
--- a/components/search_engines/template_url_service.h
|
||||
+++ b/components/search_engines/template_url_service.h
|
||||
@@ -740,6 +740,8 @@ class TemplateURLService : public WebDat
|
||||
@@ -722,6 +722,8 @@ class TemplateURLService : public WebDat
|
||||
// ---------- Browser state related members ---------------------------------
|
||||
PrefService* prefs_;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
--- a/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
|
||||
+++ b/chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
|
||||
@@ -25,6 +25,7 @@ ChromeAutocompleteSchemeClassifier::GetI
|
||||
@@ -28,6 +28,7 @@ ChromeAutocompleteSchemeClassifier::GetI
|
||||
if (base::IsStringASCII(scheme) &&
|
||||
(ProfileIOData::IsHandledProtocol(scheme) ||
|
||||
base::LowerCaseEqualsASCII(scheme, content::kViewSourceScheme) ||
|
||||
@@ -24,7 +24,7 @@
|
||||
url.SchemeIs(dom_distiller::kDomDistillerScheme))
|
||||
--- a/chrome/browser/ui/singleton_tabs.cc
|
||||
+++ b/chrome/browser/ui/singleton_tabs.cc
|
||||
@@ -101,7 +101,8 @@ int GetIndexOfExistingTab(Browser* brows
|
||||
@@ -100,7 +100,8 @@ int GetIndexOfExistingTab(Browser* brows
|
||||
|
||||
// Skip view-source tabs. This is needed because RewriteURLIfNecessary
|
||||
// removes the "view-source:" scheme which leads to incorrect matching.
|
||||
@@ -36,7 +36,7 @@
|
||||
GURL rewritten_tab_url = tab_url;
|
||||
--- a/components/omnibox/browser/autocomplete_input.cc
|
||||
+++ b/components/omnibox/browser/autocomplete_input.cc
|
||||
@@ -487,7 +487,8 @@ void AutocompleteInput::ParseForEmphasiz
|
||||
@@ -491,7 +491,8 @@ void AutocompleteInput::ParseForEmphasiz
|
||||
int after_scheme_and_colon = parts.scheme.end() + 1;
|
||||
// For the view-source scheme, we should emphasize the scheme and host of the
|
||||
// URL qualified by the view-source prefix.
|
||||
@@ -46,7 +46,7 @@
|
||||
(static_cast<int>(text.length()) > after_scheme_and_colon)) {
|
||||
// Obtain the URL prefixed by view-source and parse it.
|
||||
base::string16 real_url(text.substr(after_scheme_and_colon));
|
||||
@@ -556,7 +557,9 @@ int AutocompleteInput::NumNonHostCompone
|
||||
@@ -564,7 +565,9 @@ int AutocompleteInput::NumNonHostCompone
|
||||
bool AutocompleteInput::HasHTTPScheme(const base::string16& input) {
|
||||
std::string utf8_input(base::UTF16ToUTF8(input));
|
||||
url::Component scheme;
|
||||
@@ -59,7 +59,7 @@
|
||||
return url::FindAndCompareScheme(utf8_input, url::kHttpScheme, nullptr);
|
||||
--- a/content/browser/child_process_security_policy_impl.cc
|
||||
+++ b/content/browser/child_process_security_policy_impl.cc
|
||||
@@ -336,6 +336,7 @@ ChildProcessSecurityPolicyImpl::ChildPro
|
||||
@@ -335,6 +335,7 @@ ChildProcessSecurityPolicyImpl::ChildPro
|
||||
RegisterWebSafeScheme(url::kHttpsScheme);
|
||||
RegisterWebSafeScheme(url::kFtpScheme);
|
||||
RegisterWebSafeScheme(url::kDataScheme);
|
||||
@@ -77,7 +77,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
@@ -42,6 +43,7 @@
|
||||
@@ -43,6 +44,7 @@
|
||||
#include "net/url_request/url_request_redirect_job.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
#if BUILDFLAG(ENABLE_REPORTING)
|
||||
#include "net/network_error_logging/network_error_logging_service.h"
|
||||
@@ -581,6 +583,12 @@ URLRequest::URLRequest(const GURL& url,
|
||||
@@ -583,6 +585,12 @@ URLRequest::URLRequest(const GURL& url,
|
||||
// Sanity check out environment.
|
||||
DCHECK(base::ThreadTaskRunnerHandle::IsSet());
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
return GURL(parts.scheme.is_valid() ? text : FixupPath(text));
|
||||
--- a/net/BUILD.gn
|
||||
+++ b/net/BUILD.gn
|
||||
@@ -1735,6 +1735,8 @@ component("net") {
|
||||
@@ -1743,6 +1743,8 @@ component("net") {
|
||||
"url_request/report_sender.h",
|
||||
"url_request/static_http_user_agent_settings.cc",
|
||||
"url_request/static_http_user_agent_settings.h",
|
||||
@@ -164,7 +164,7 @@
|
||||
DCHECK(set_protocol);
|
||||
--- a/chrome/browser/profiles/profile_io_data.cc
|
||||
+++ b/chrome/browser/profiles/profile_io_data.cc
|
||||
@@ -101,6 +101,7 @@
|
||||
@@ -99,6 +99,7 @@
|
||||
#include "net/url_request/file_protocol_handler.h"
|
||||
#include "net/url_request/ftp_protocol_handler.h"
|
||||
#include "net/url_request/report_sender.h"
|
||||
@@ -172,7 +172,7 @@
|
||||
#include "net/url_request/url_request.h"
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_context_builder.h"
|
||||
@@ -1327,6 +1328,9 @@ ProfileIOData::SetUpJobFactoryDefaults(
|
||||
@@ -1321,6 +1322,9 @@ ProfileIOData::SetUpJobFactoryDefaults(
|
||||
set_protocol = job_factory->SetProtocolHandler(
|
||||
url::kDataScheme, std::make_unique<net::DataProtocolHandler>());
|
||||
DCHECK(set_protocol);
|
||||
@@ -184,7 +184,7 @@
|
||||
set_protocol = job_factory->SetProtocolHandler(
|
||||
--- a/chromecast/browser/url_request_context_factory.cc
|
||||
+++ b/chromecast/browser/url_request_context_factory.cc
|
||||
@@ -42,6 +42,7 @@
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "net/ssl/ssl_config_service_defaults.h"
|
||||
#include "net/url_request/data_protocol_handler.h"
|
||||
#include "net/url_request/file_protocol_handler.h"
|
||||
@@ -192,7 +192,7 @@
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_context_builder.h"
|
||||
#include "net/url_request/url_request_context_getter.h"
|
||||
@@ -286,6 +287,9 @@ void URLRequestContextFactory::Initializ
|
||||
@@ -284,6 +285,9 @@ void URLRequestContextFactory::Initializ
|
||||
set_protocol = job_factory->SetProtocolHandler(
|
||||
url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler));
|
||||
DCHECK(set_protocol);
|
||||
@@ -269,7 +269,7 @@
|
||||
+#endif // NET_URL_REQUEST_TRK_PROTOCOL_HANDLER_H_
|
||||
--- a/net/url_request/url_request_context_builder.cc
|
||||
+++ b/net/url_request/url_request_context_builder.cc
|
||||
@@ -41,6 +41,7 @@
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "net/ssl/ssl_config_service_defaults.h"
|
||||
#include "net/url_request/data_protocol_handler.h"
|
||||
#include "net/url_request/static_http_user_agent_settings.h"
|
||||
@@ -277,7 +277,7 @@
|
||||
#include "net/url_request/url_request_context.h"
|
||||
#include "net/url_request/url_request_context_storage.h"
|
||||
#include "net/url_request/url_request_intercepting_job_factory.h"
|
||||
@@ -596,6 +597,8 @@ std::unique_ptr<URLRequestContext> URLRe
|
||||
@@ -595,6 +596,8 @@ std::unique_ptr<URLRequestContext> URLRe
|
||||
if (data_enabled_)
|
||||
job_factory->SetProtocolHandler(url::kDataScheme,
|
||||
std::make_unique<DataProtocolHandler>());
|
||||
@@ -288,7 +288,7 @@
|
||||
if (file_enabled_) {
|
||||
--- a/url/url_util.cc
|
||||
+++ b/url/url_util.cc
|
||||
@@ -49,6 +49,7 @@ const char* kSecureSchemes[] = {
|
||||
@@ -52,6 +52,7 @@ const char* kSecureSchemes[] = {
|
||||
kHttpsScheme,
|
||||
kAboutScheme,
|
||||
kDataScheme,
|
||||
@@ -296,9 +296,9 @@
|
||||
kWssScheme,
|
||||
};
|
||||
|
||||
@@ -66,6 +67,7 @@ const char* kCORSEnabledSchemes[] = {
|
||||
kHttpScheme,
|
||||
@@ -69,6 +70,7 @@ const char* kCORSEnabledSchemes[] = {
|
||||
kHttpsScheme,
|
||||
kHttpScheme,
|
||||
kDataScheme,
|
||||
+ kTraceScheme,
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/app/chrome_command_ids.h
|
||||
+++ b/chrome/app/chrome_command_ids.h
|
||||
@@ -150,6 +150,7 @@
|
||||
@@ -152,6 +152,7 @@
|
||||
#define IDC_DEV_TOOLS_INSPECT 40023
|
||||
#define IDC_UPGRADE_DIALOG 40024
|
||||
#define IDC_VIEW_INCOMPATIBILITIES 40025
|
||||
@@ -12,7 +12,7 @@
|
||||
#define IDC_BOOKMARKS_MENU 40029
|
||||
--- a/chrome/app/generated_resources.grd
|
||||
+++ b/chrome/app/generated_resources.grd
|
||||
@@ -1050,6 +1050,9 @@ are declared in build/common.gypi.
|
||||
@@ -1053,6 +1053,9 @@ are declared in build/common.gypi.
|
||||
<message name="IDS_CLEAR_BROWSING_DATA" desc="The text label for the menu item for clearing of browsing data">
|
||||
&Clear browsing data...
|
||||
</message>
|
||||
@@ -22,7 +22,7 @@
|
||||
<message name="IDS_SHOW_DOWNLOADS" desc="The show downloads menu in the app menu">
|
||||
&Downloads
|
||||
</message>
|
||||
@@ -1088,6 +1091,9 @@ are declared in build/common.gypi.
|
||||
@@ -1091,6 +1094,9 @@ are declared in build/common.gypi.
|
||||
<message name="IDS_CLEAR_BROWSING_DATA" desc="In Title Case: The text label for the menu item for clearing of browsing data">
|
||||
&Clear Browsing Data...
|
||||
</message>
|
||||
@@ -78,9 +78,9 @@
|
||||
|
||||
--- a/chrome/browser/ui/browser_command_controller.cc
|
||||
+++ b/chrome/browser/ui/browser_command_controller.cc
|
||||
@@ -59,6 +59,9 @@
|
||||
@@ -60,6 +60,9 @@
|
||||
#include "extensions/browser/extension_system.h"
|
||||
#include "printing/features/features.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "ui/events/keycodes/keyboard_codes.h"
|
||||
+#include "net/url_request/url_request_context.h"
|
||||
+#include "net/url_request/url_request_context_getter.h"
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#include "chrome/browser/ui/browser_commands_mac.h"
|
||||
@@ -624,6 +627,9 @@ bool BrowserCommandController::ExecuteCo
|
||||
@@ -629,6 +632,9 @@ bool BrowserCommandController::ExecuteCo
|
||||
case IDC_CLEAR_BROWSING_DATA:
|
||||
ShowClearBrowsingDataDialog(browser_);
|
||||
break;
|
||||
@@ -98,7 +98,7 @@
|
||||
case IDC_IMPORT_SETTINGS:
|
||||
ShowImportDialog(browser_);
|
||||
break;
|
||||
@@ -865,6 +871,7 @@ void BrowserCommandController::InitComma
|
||||
@@ -871,6 +877,7 @@ void BrowserCommandController::InitComma
|
||||
!profile()->IsOffTheRecord());
|
||||
command_updater_.UpdateCommandEnabled(IDC_CLEAR_BROWSING_DATA,
|
||||
!guest_session);
|
||||
@@ -108,7 +108,7 @@
|
||||
#else
|
||||
--- a/tools/metrics/histograms/histograms.xml
|
||||
+++ b/tools/metrics/histograms/histograms.xml
|
||||
@@ -114814,6 +114814,7 @@ http://cs/file:chrome/histograms.xml - b
|
||||
@@ -118373,6 +118373,7 @@ http://cs/file:chrome/histograms.xml - b
|
||||
<suffix name="OpenInChrome"/>
|
||||
<suffix name="SiteSettings"/>
|
||||
<suffix name="AppInfo"/>
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
--- a/tools/metrics/histograms/enums.xml
|
||||
+++ b/tools/metrics/histograms/enums.xml
|
||||
@@ -46999,6 +46999,7 @@ Called by update_traffic_annotation_hist
|
||||
@@ -48307,6 +48307,7 @@ Full version information for the fingerp
|
||||
<int value="48" label="Open in Chrome"/>
|
||||
<int value="49" label="Site Settings"/>
|
||||
<int value="50" label="App Info"/>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/components/domain_reliability/google_configs.cc
|
||||
+++ b/components/domain_reliability/google_configs.cc
|
||||
@@ -13,574 +13,10 @@
|
||||
@@ -13,575 +13,10 @@
|
||||
|
||||
namespace domain_reliability {
|
||||
|
||||
@@ -344,6 +344,7 @@
|
||||
- {"googletagmanager.com", true, false, false},
|
||||
- {"googletagservices.com", true, false, false},
|
||||
- {"googleusercontent.com", true, false, false},
|
||||
- {"googlezip.net", true, false, false},
|
||||
- {"gstatic.cn", true, false, false},
|
||||
- {"gstatic.com", true, false, false},
|
||||
- {"gvt3.com", true, false, false},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/content/browser/renderer_host/pepper/pepper_file_io_host.cc
|
||||
+++ b/content/browser/renderer_host/pepper/pepper_file_io_host.cc
|
||||
@@ -445,7 +445,7 @@ void PepperFileIOHost::OnLocalFileOpened
|
||||
@@ -440,7 +440,7 @@ void PepperFileIOHost::OnLocalFileOpened
|
||||
ppapi::host::ReplyMessageContext reply_context,
|
||||
const base::FilePath& path,
|
||||
base::File::Error error_code) {
|
||||
@@ -11,7 +11,7 @@
|
||||
// Quarantining a file before its contents are available is only supported on
|
||||
// Windows and Linux.
|
||||
if (!FileOpenForWrite(open_flags_) || error_code != base::File::FILE_OK) {
|
||||
@@ -465,7 +465,7 @@ void PepperFileIOHost::OnLocalFileOpened
|
||||
@@ -460,7 +460,7 @@ void PepperFileIOHost::OnLocalFileOpened
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -41,17 +41,17 @@
|
||||
void SendFileOpenReply(ppapi::host::ReplyMessageContext reply_context,
|
||||
base::File::Error error_code);
|
||||
|
||||
--- a/content/browser/download/base_file.cc
|
||||
+++ b/content/browser/download/base_file.cc
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "build/build_config.h"
|
||||
--- a/components/download/internal/common/base_file.cc
|
||||
+++ b/components/download/internal/common/base_file.cc
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "components/download/public/common/download_interrupt_reasons_utils.h"
|
||||
#include "components/download/public/common/download_item.h"
|
||||
#include "components/download/public/common/download_stats.h"
|
||||
-#include "components/download/quarantine/quarantine.h"
|
||||
#include "content/browser/download/download_interrupt_reasons_utils.h"
|
||||
#include "crypto/secure_hash.h"
|
||||
#include "net/base/net_errors.h"
|
||||
@@ -439,7 +438,7 @@ download::DownloadInterruptReason BaseFi
|
||||
|
||||
#define CONDITIONAL_TRACE(trace) \
|
||||
@@ -432,7 +431,7 @@ DownloadInterruptReason BaseFile::LogInt
|
||||
return reason;
|
||||
}
|
||||
|
||||
@@ -60,13 +60,13 @@
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -523,7 +522,7 @@ download::DownloadInterruptReason BaseFi
|
||||
@@ -516,7 +515,7 @@ DownloadInterruptReason BaseFile::Annota
|
||||
}
|
||||
return download::DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
|
||||
return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
|
||||
}
|
||||
-#else // !OS_WIN && !OS_MACOSX && !OS_LINUX
|
||||
+#else // 1
|
||||
download::DownloadInterruptReason BaseFile::AnnotateWithSourceInformation(
|
||||
DownloadInterruptReason BaseFile::AnnotateWithSourceInformation(
|
||||
const std::string& client_guid,
|
||||
const GURL& source_url,
|
||||
--- a/components/download/quarantine/quarantine.cc
|
||||
@@ -94,5 +94,5 @@
|
||||
"//components/download/public/common:public",
|
||||
- "//components/download/quarantine",
|
||||
"//components/filename_generation",
|
||||
"//components/filesystem:lib",
|
||||
"//components/leveldb:lib",
|
||||
"//components/link_header_util",
|
||||
"//components/metrics",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/net/base/url_util.cc
|
||||
+++ b/net/base/url_util.cc
|
||||
@@ -397,28 +397,6 @@ void GetIdentityFromURL(const GURL& url,
|
||||
@@ -383,28 +383,6 @@ void GetIdentityFromURL(const GURL& url,
|
||||
}
|
||||
|
||||
bool HasGoogleHost(const GURL& url) {
|
||||
@@ -136,18 +136,19 @@
|
||||
bool IsGoogleSearchResultUrl(const GURL& url) {
|
||||
--- a/components/search_engines/template_url.cc
|
||||
+++ b/components/search_engines/template_url.cc
|
||||
@@ -510,11 +510,6 @@ base::string16 TemplateURLRef::SearchTer
|
||||
@@ -510,11 +510,7 @@ base::string16 TemplateURLRef::SearchTer
|
||||
bool TemplateURLRef::HasGoogleBaseURLs(
|
||||
const SearchTermsData& search_terms_data) const {
|
||||
ParseIfNecessary(search_terms_data);
|
||||
- for (size_t i = 0; i < replacements_.size(); ++i) {
|
||||
- if ((replacements_[i].type == GOOGLE_BASE_URL) ||
|
||||
- (replacements_[i].type == GOOGLE_BASE_SUGGEST_URL))
|
||||
- return true;
|
||||
- }
|
||||
return false;
|
||||
- return std::any_of(replacements_.begin(), replacements_.end(),
|
||||
- [](const Replacement& replacement) {
|
||||
- return replacement.type == GOOGLE_BASE_URL ||
|
||||
- replacement.type == GOOGLE_BASE_SUGGEST_URL;
|
||||
- });
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool TemplateURLRef::ExtractSearchTermsFromURL(
|
||||
--- a/components/google/core/browser/google_util.cc
|
||||
+++ b/components/google/core/browser/google_util.cc
|
||||
@@ -41,118 +41,16 @@ namespace {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
--- a/chrome/browser/intranet_redirect_detector.cc
|
||||
+++ b/chrome/browser/intranet_redirect_detector.cc
|
||||
@@ -72,9 +72,7 @@ void IntranetRedirectDetector::FinishSle
|
||||
fetchers_.clear();
|
||||
@@ -75,9 +75,7 @@ void IntranetRedirectDetector::FinishSle
|
||||
simple_loaders_.clear();
|
||||
resulting_origins_.clear();
|
||||
|
||||
- const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
|
||||
@@ -12,5 +12,5 @@
|
||||
- return;
|
||||
+ return;
|
||||
|
||||
DCHECK(fetchers_.empty() && resulting_origins_.empty());
|
||||
DCHECK(simple_loaders_.empty() && resulting_origins_.empty());
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@
|
||||
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -306,7 +306,6 @@ if (!is_android && !is_mac) {
|
||||
@@ -314,7 +314,6 @@ if (!is_android && !is_mac) {
|
||||
}
|
||||
|
||||
data_deps += [
|
||||
- "//chrome/browser/resources/media/mei_preload:component",
|
||||
"//third_party/widevine/cdm:widevinecdmadapter",
|
||||
"//third_party/widevine/cdm",
|
||||
]
|
||||
|
||||
@@ -1283,7 +1282,6 @@ if (is_win) {
|
||||
@@ -1289,7 +1288,6 @@ if (is_win) {
|
||||
":widevine_cdm_library",
|
||||
"//build/config:exe_and_shlib_deps",
|
||||
"//chrome/app/nibs:chrome_xibs",
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
AccountInfo SigninManagerBase::GetAuthenticatedAccountInfo() const {
|
||||
--- a/chrome/browser/ui/chrome_pages.cc
|
||||
+++ b/chrome/browser/ui/chrome_pages.cc
|
||||
@@ -76,12 +76,6 @@ void OpenBookmarkManagerForNode(Browser*
|
||||
@@ -77,12 +77,6 @@ void OpenBookmarkManagerForNode(Browser*
|
||||
ShowSingletonTabOverwritingNTP(browser, params);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
// Shows either the help app or the appropriate help page for |source|. If
|
||||
// |browser| is NULL and the help page is used (vs the app), the help page is
|
||||
// shown in the last active browser. If there is no such browser, a new browser
|
||||
@@ -396,46 +390,6 @@ void ShowSearchEngineSettings(Browser* b
|
||||
@@ -397,51 +391,6 @@ void ShowSearchEngineSettings(Browser* b
|
||||
#if !defined(OS_ANDROID)
|
||||
void ShowBrowserSignin(Browser* browser,
|
||||
signin_metrics::AccessPoint access_point) {
|
||||
@@ -44,31 +44,36 @@
|
||||
-
|
||||
-#if defined(OS_CHROMEOS)
|
||||
- // ChromeOS doesn't have the avatar bubble.
|
||||
- const bool can_show_avatar_bubble = false;
|
||||
- const bool show_full_tab_chrome_signin_page = true;
|
||||
-#else
|
||||
- // The sign-in modal dialog is presented as a tab-modal dialog (which is
|
||||
- // automatically dismissed when the page navigates). Displaying the dialog on
|
||||
- // a new tab that loads any page will lead to it being dismissed as soon as
|
||||
- // the new tab is loaded. So the sign-in dialog must only be presented on top
|
||||
- // of an existing tab.
|
||||
- // When Desktop Identity Consistency (aka DICE) is not enabled, Chrome uses
|
||||
- // a modal sign-in dialog for signing in. This sign-in modal dialog is
|
||||
- // presented as a tab-modal dialog (which is automatically dismissed when
|
||||
- // the page navigates). Displaying the dialog on a new tab that loads any
|
||||
- // page will lead to it being dismissed as soon as the new tab is loaded.
|
||||
- // So the sign-in dialog must only be presented on top of an existing tab.
|
||||
- //
|
||||
- // If ScopedTabbedBrowserDisplayer had to create a (non-incognito) Browser*,
|
||||
- // it won't have any tabs yet. Fallback to the full-tab sign-in flow in this
|
||||
- // case.
|
||||
- const bool can_show_avatar_bubble = !browser->tab_strip_model()->empty();
|
||||
- const bool show_full_tab_chrome_signin_page =
|
||||
- !signin::DiceMethodGreaterOrEqual(
|
||||
- AccountConsistencyModeManager::GetMethodForProfile(
|
||||
- browser->profile()),
|
||||
- signin::AccountConsistencyMethod::kDicePrepareMigration) &&
|
||||
- browser->tab_strip_model()->empty();
|
||||
-#endif // defined(OS_CHROMEOS)
|
||||
-
|
||||
- if (can_show_avatar_bubble) {
|
||||
- browser->window()->ShowAvatarBubbleFromAvatarButton(
|
||||
- BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN,
|
||||
- signin::ManageAccountsParams(), access_point, false);
|
||||
- } else {
|
||||
- if (show_full_tab_chrome_signin_page) {
|
||||
- NavigateToSingletonTab(
|
||||
- browser,
|
||||
- signin::GetPromoURLForTab(
|
||||
- access_point, signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT,
|
||||
- false));
|
||||
- DCHECK_GT(browser->tab_strip_model()->count(), 0);
|
||||
- } else {
|
||||
- browser->window()->ShowAvatarBubbleFromAvatarButton(
|
||||
- BrowserWindow::AVATAR_BUBBLE_MODE_SIGNIN,
|
||||
- signin::ManageAccountsParams(), access_point, false);
|
||||
- }
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/browser/plugins/plugins_resource_service.cc
|
||||
+++ b/chrome/browser/plugins/plugins_resource_service.cc
|
||||
@@ -52,9 +52,6 @@ const int kStartResourceFetchDelayMs = 6
|
||||
@@ -51,9 +51,6 @@ const int kStartResourceFetchDelayMs = 6
|
||||
// Delay between calls to update the cache 1 day and 2 minutes in testing mode.
|
||||
const int kCacheUpdateDelayMs = 24 * 60 * 60 * 1000;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
GURL GetPluginsServerURL() {
|
||||
std::string filename;
|
||||
#if defined(OS_WIN)
|
||||
@@ -69,7 +66,7 @@ GURL GetPluginsServerURL() {
|
||||
@@ -68,7 +65,7 @@ GURL GetPluginsServerURL() {
|
||||
#error Unknown platform
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
} // namespace
|
||||
--- a/chrome/browser/safe_browsing/client_side_model_loader.cc
|
||||
+++ b/chrome/browser/safe_browsing/client_side_model_loader.cc
|
||||
@@ -34,8 +34,6 @@ namespace safe_browsing {
|
||||
@@ -35,8 +35,6 @@ namespace safe_browsing {
|
||||
// Model Loader strings
|
||||
const size_t ModelLoader::kMaxModelSizeBytes = 150 * 1024;
|
||||
const int ModelLoader::kClientModelFetchIntervalMs = 3600 * 1000;
|
||||
@@ -32,34 +32,34 @@
|
||||
const char ModelLoader::kClientModelNamePattern[] =
|
||||
"client_model_v5%s_variation_%d.pb";
|
||||
const char ModelLoader::kClientModelFinchExperiment[] =
|
||||
@@ -88,7 +86,7 @@ ModelLoader::ModelLoader(base::Closure u
|
||||
net::URLRequestContextGetter* request_context_getter,
|
||||
bool is_extended_reporting)
|
||||
@@ -90,7 +88,7 @@ ModelLoader::ModelLoader(
|
||||
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
|
||||
bool is_extended_reporting)
|
||||
: name_(FillInModelName(is_extended_reporting, GetModelNumber())),
|
||||
- url_(kClientModelUrlPrefix + name_),
|
||||
+ url_("about:blank"),
|
||||
update_renderers_callback_(update_renderers_callback),
|
||||
request_context_getter_(request_context_getter),
|
||||
url_loader_factory_(url_loader_factory),
|
||||
weak_factory_(this) {
|
||||
@@ -99,7 +97,7 @@ ModelLoader::ModelLoader(base::Closure u
|
||||
ModelLoader::ModelLoader(base::Closure update_renderers_callback,
|
||||
const std::string& model_name)
|
||||
@@ -103,7 +101,7 @@ ModelLoader::ModelLoader(
|
||||
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
|
||||
const std::string& model_name)
|
||||
: name_(model_name),
|
||||
- url_(kClientModelUrlPrefix + name_),
|
||||
+ url_("about:blank"),
|
||||
update_renderers_callback_(update_renderers_callback),
|
||||
request_context_getter_(NULL),
|
||||
url_loader_factory_(url_loader_factory),
|
||||
weak_factory_(this) {
|
||||
--- a/chrome/browser/safe_browsing/client_side_model_loader.h
|
||||
+++ b/chrome/browser/safe_browsing/client_side_model_loader.h
|
||||
@@ -43,7 +43,6 @@ class ModelLoader : public net::URLFetch
|
||||
@@ -42,7 +42,6 @@ class ModelLoader {
|
||||
static const int kClientModelFetchIntervalMs;
|
||||
static const char kClientModelFinchExperiment[];
|
||||
static const char kClientModelFinchParam[];
|
||||
- static const char kClientModelUrlPrefix[];
|
||||
static const char kClientModelNamePattern[];
|
||||
|
||||
// Constructs a model loader to fetch a model using |request_context_getter|.
|
||||
// Constructs a model loader to fetch a model using |url_loader_factory|.
|
||||
--- a/rlz/lib/lib_values.cc
|
||||
+++ b/rlz/lib/lib_values.cc
|
||||
@@ -41,7 +41,6 @@ const char kSetDccResponseVariable[] = "
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
--- a/rlz/lib/financial_ping.cc
|
||||
+++ b/rlz/lib/financial_ping.cc
|
||||
@@ -366,7 +366,7 @@ bool FinancialPing::PingServer(const cha
|
||||
@@ -351,7 +351,7 @@ FinancialPing::PingResponse FinancialPin
|
||||
|
||||
// Open network connection.
|
||||
InternetHandle connection_handle = InternetConnectA(inet_handle,
|
||||
@@ -90,9 +90,9 @@
|
||||
+ "about:blank", kFinancialPort, "", "", INTERNET_SERVICE_HTTP,
|
||||
INTERNET_FLAG_NO_CACHE_WRITE, 0);
|
||||
if (!connection_handle)
|
||||
return false;
|
||||
@@ -410,7 +410,7 @@ bool FinancialPing::PingServer(const cha
|
||||
return true;
|
||||
return PING_FAILURE;
|
||||
@@ -395,7 +395,7 @@ FinancialPing::PingResponse FinancialPin
|
||||
return PING_SUCCESSFUL;
|
||||
#else
|
||||
std::string url =
|
||||
- base::StringPrintf("https://%s%s", kFinancialServer, request);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/content/public/common/url_utils.cc
|
||||
+++ b/content/public/common/url_utils.cc
|
||||
@@ -19,11 +19,7 @@ bool HasWebUIScheme(const GURL& url) {
|
||||
@@ -20,11 +20,7 @@ bool HasWebUIScheme(const GURL& url) {
|
||||
}
|
||||
|
||||
bool IsSavableURL(const GURL& url) {
|
||||
@@ -30,7 +30,7 @@
|
||||
if (current_tab->ShowingInterstitialPage())
|
||||
content_restrictions |= CONTENT_RESTRICTION_PRINT;
|
||||
}
|
||||
@@ -885,8 +879,7 @@ bool CanSavePage(const Browser* browser)
|
||||
@@ -886,8 +880,7 @@ bool CanSavePage(const Browser* browser)
|
||||
prefs::kAllowFileSelectionDialogs)) {
|
||||
return false;
|
||||
}
|
||||
@@ -53,8 +53,8 @@
|
||||
OfflinePageModel::OfflinePageModel() = default;
|
||||
--- a/content/common/url_schemes.cc
|
||||
+++ b/content/common/url_schemes.cc
|
||||
@@ -27,6 +27,10 @@ std::vector<url::Origin>* secure_origins
|
||||
std::vector<std::string>* service_worker_schemes = nullptr;
|
||||
@@ -19,6 +19,10 @@ namespace content {
|
||||
namespace {
|
||||
|
||||
const char* const kDefaultSavableSchemes[] = {
|
||||
+ url::kAboutScheme,
|
||||
@@ -64,7 +64,7 @@
|
||||
url::kHttpScheme,
|
||||
url::kHttpsScheme,
|
||||
url::kFileScheme,
|
||||
@@ -34,7 +38,13 @@ const char* const kDefaultSavableSchemes
|
||||
@@ -26,7 +30,13 @@ const char* const kDefaultSavableSchemes
|
||||
url::kFtpScheme,
|
||||
kChromeDevToolsScheme,
|
||||
kChromeUIScheme,
|
||||
@@ -78,4 +78,4 @@
|
||||
+ kViewSourceScheme
|
||||
};
|
||||
|
||||
} // namespace
|
||||
// These lists are lazily initialized below and are leaked on shutdown to
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -114,6 +114,7 @@
|
||||
@@ -117,6 +117,7 @@
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "services/service_manager/sandbox/switches.h"
|
||||
#include "third_party/libaom/av1_features.h"
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "ui/app_list/app_list_features.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
@@ -1236,6 +1237,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
@@ -1255,6 +1256,10 @@ const FeatureEntry kFeatureEntries[] = {
|
||||
"Force punycode hostnames",
|
||||
"Force punycode in hostnames instead of Unicode when displaying Internationalized Domain Names (IDNs).",
|
||||
kOsAll, SINGLE_VALUE_TYPE("force-punycode-hostnames")},
|
||||
@@ -27,32 +27,32 @@
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "services/device/public/cpp/device_features.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "third_party/WebKit/public/platform/WebRuntimeFeatures.h"
|
||||
#include "third_party/blink/public/platform/web_runtime_features.h"
|
||||
+#include "third_party/ungoogled/ungoogled_switches.h"
|
||||
#include "ui/gfx/switches.h"
|
||||
#include "ui/gl/gl_switches.h"
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
@@ -435,6 +436,9 @@ void SetRuntimeFeaturesDefaultsAndUpdate
|
||||
@@ -449,6 +450,9 @@ void SetRuntimeFeaturesDefaultsAndUpdate
|
||||
|
||||
if (base::FeatureList::IsEnabled(features::kUnifiedTouchAdjustment))
|
||||
WebRuntimeFeatures::EnableUnifiedTouchAdjustment(true);
|
||||
WebRuntimeFeatures::EnableOffMainThreadWebSocket(
|
||||
base::FeatureList::IsEnabled(features::kOffMainThreadWebSocket));
|
||||
+
|
||||
+ WebRuntimeFeatures::EnableFingerprintingClientRectsNoise(
|
||||
+ command_line.HasSwitch(switches::kFingerprintingClientRectsNoise));
|
||||
};
|
||||
|
||||
} // namespace content
|
||||
--- a/third_party/WebKit/Source/core/dom/Document.cpp
|
||||
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
--- a/third_party/blink/renderer/core/dom/document.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/document.cc
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "core/dom/Document.h"
|
||||
#include <memory>
|
||||
|
||||
+#include "base/rand_util.h"
|
||||
#include "bindings/core/v8/ExceptionMessages.h"
|
||||
#include "bindings/core/v8/ExceptionState.h"
|
||||
#include "bindings/core/v8/ScriptController.h"
|
||||
@@ -729,6 +730,15 @@ Document::Document(const DocumentInit& i
|
||||
#include "services/metrics/public/cpp/mojo_ukm_recorder.h"
|
||||
#include "services/metrics/public/cpp/ukm_builders.h"
|
||||
#include "services/metrics/public/cpp/ukm_source_id.h"
|
||||
@@ -737,6 +738,15 @@ Document::Document(const DocumentInit& i
|
||||
#ifndef NDEBUG
|
||||
liveDocumentSet().insert(this);
|
||||
#endif
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
|
||||
Document::~Document() {
|
||||
@@ -755,6 +765,14 @@ Range* Document::CreateRangeAdjustedToTr
|
||||
@@ -763,6 +773,14 @@ Range* Document::CreateRangeAdjustedToTr
|
||||
Position::BeforeNode(*shadow_host));
|
||||
}
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
SelectorQueryCache& Document::GetSelectorQueryCache() {
|
||||
if (!selector_query_cache_)
|
||||
selector_query_cache_ = std::make_unique<SelectorQueryCache>();
|
||||
--- a/third_party/WebKit/Source/core/dom/Document.h
|
||||
+++ b/third_party/WebKit/Source/core/dom/Document.h
|
||||
@@ -406,6 +406,10 @@ class CORE_EXPORT Document : public Cont
|
||||
--- a/third_party/blink/renderer/core/dom/document.h
|
||||
+++ b/third_party/blink/renderer/core/dom/document.h
|
||||
@@ -408,6 +408,10 @@ class CORE_EXPORT Document : public Cont
|
||||
|
||||
String origin() const;
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
String visibilityState() const;
|
||||
mojom::PageVisibilityState GetPageVisibilityState() const;
|
||||
bool hidden() const;
|
||||
@@ -1663,6 +1667,9 @@ class CORE_EXPORT Document : public Cont
|
||||
@@ -1670,6 +1674,9 @@ class CORE_EXPORT Document : public Cont
|
||||
|
||||
double start_time_;
|
||||
|
||||
@@ -106,9 +106,9 @@
|
||||
TraceWrapperMember<ScriptRunner> script_runner_;
|
||||
|
||||
HeapVector<Member<ScriptElementBase>> current_script_stack_;
|
||||
--- a/third_party/WebKit/Source/core/dom/Element.cpp
|
||||
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
|
||||
@@ -1327,6 +1327,11 @@ DOMRectList* Element::getClientRects() {
|
||||
--- a/third_party/blink/renderer/core/dom/element.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/element.cc
|
||||
@@ -1348,6 +1348,11 @@ DOMRectList* Element::getClientRects() {
|
||||
DCHECK(element_layout_object);
|
||||
GetDocument().AdjustFloatQuadsForScrollAndAbsoluteZoom(
|
||||
quads, *element_layout_object);
|
||||
@@ -120,7 +120,7 @@
|
||||
return DOMRectList::Create(quads);
|
||||
}
|
||||
|
||||
@@ -1344,6 +1349,9 @@ DOMRect* Element::getBoundingClientRect(
|
||||
@@ -1365,6 +1370,9 @@ DOMRect* Element::getBoundingClientRect(
|
||||
DCHECK(element_layout_object);
|
||||
GetDocument().AdjustFloatRectForScrollAndAbsoluteZoom(result,
|
||||
*element_layout_object);
|
||||
@@ -130,9 +130,9 @@
|
||||
return DOMRect::FromFloatRect(result);
|
||||
}
|
||||
|
||||
--- a/third_party/WebKit/Source/core/dom/Range.cpp
|
||||
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
|
||||
@@ -1589,11 +1589,21 @@ DOMRectList* Range::getClientRects() con
|
||||
--- a/third_party/blink/renderer/core/dom/range.cc
|
||||
+++ b/third_party/blink/renderer/core/dom/range.cc
|
||||
@@ -1575,11 +1575,21 @@ DOMRectList* Range::getClientRects() con
|
||||
Vector<FloatQuad> quads;
|
||||
GetBorderAndTextQuads(quads);
|
||||
|
||||
@@ -155,9 +155,9 @@
|
||||
}
|
||||
|
||||
// TODO(editing-dev): We should make
|
||||
--- a/third_party/WebKit/Source/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/WebKit/Source/platform/runtime_enabled_features.json5
|
||||
@@ -432,6 +432,9 @@
|
||||
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
@@ -477,6 +477,9 @@
|
||||
status: "stable",
|
||||
},
|
||||
{
|
||||
@@ -167,10 +167,10 @@
|
||||
name: "FocusOptions",
|
||||
status: "stable",
|
||||
},
|
||||
--- a/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
|
||||
+++ b/third_party/WebKit/Source/platform/exported/WebRuntimeFeatures.cpp
|
||||
@@ -506,4 +506,8 @@ void WebRuntimeFeatures::EnableMojoBlobU
|
||||
RuntimeEnabledFeatures::SetMojoBlobURLsEnabled(enable);
|
||||
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
|
||||
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
|
||||
@@ -518,4 +518,8 @@ void WebRuntimeFeatures::EnableOffMainTh
|
||||
RuntimeEnabledFeatures::SetOffMainThreadWebSocketEnabled(enable);
|
||||
}
|
||||
|
||||
+void WebRuntimeFeatures::EnableFingerprintingClientRectsNoise(bool enable) {
|
||||
@@ -178,19 +178,19 @@
|
||||
+}
|
||||
+
|
||||
} // namespace blink
|
||||
--- a/third_party/WebKit/public/platform/WebRuntimeFeatures.h
|
||||
+++ b/third_party/WebKit/public/platform/WebRuntimeFeatures.h
|
||||
@@ -188,6 +188,7 @@ class WebRuntimeFeatures {
|
||||
BLINK_PLATFORM_EXPORT static void EnableCodeCacheAfterExecute(bool);
|
||||
--- a/third_party/blink/public/platform/web_runtime_features.h
|
||||
+++ b/third_party/blink/public/platform/web_runtime_features.h
|
||||
@@ -189,6 +189,7 @@ class WebRuntimeFeatures {
|
||||
BLINK_PLATFORM_EXPORT static void EnableUnifiedTouchAdjustment(bool);
|
||||
BLINK_PLATFORM_EXPORT static void EnableMojoBlobURLs(bool);
|
||||
BLINK_PLATFORM_EXPORT static void EnableOffMainThreadWebSocket(bool);
|
||||
+ BLINK_PLATFORM_EXPORT static void EnableFingerprintingClientRectsNoise(bool);
|
||||
|
||||
private:
|
||||
WebRuntimeFeatures();
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -1811,6 +1811,7 @@ jumbo_split_static_library("browser") {
|
||||
@@ -1813,6 +1813,7 @@ jumbo_split_static_library("browser") {
|
||||
"//third_party/metrics_proto",
|
||||
"//third_party/re2",
|
||||
"//third_party/smhasher:cityhash",
|
||||
@@ -210,15 +210,15 @@
|
||||
"//third_party/zlib/google:zip",
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -205,6 +205,7 @@
|
||||
@@ -209,6 +209,7 @@
|
||||
#include "storage/browser/fileapi/sandbox_file_system_backend.h"
|
||||
#include "third_party/WebKit/public/common/page/launching_process_state.h"
|
||||
#include "third_party/WebKit/public/public_features.h"
|
||||
#include "third_party/blink/public/common/page/launching_process_state.h"
|
||||
#include "third_party/blink/public/public_buildflags.h"
|
||||
+#include "third_party/ungoogled/ungoogled_switches.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
@@ -2589,6 +2590,7 @@ void RenderProcessHostImpl::PropagateBro
|
||||
@@ -2763,6 +2764,7 @@ void RenderProcessHostImpl::PropagateBro
|
||||
switches::kEnableWebGLImageChromium,
|
||||
switches::kEnableWebVR,
|
||||
switches::kExplicitlyAllowedPorts,
|
||||
@@ -229,17 +229,17 @@
|
||||
--- a/content/child/BUILD.gn
|
||||
+++ b/content/child/BUILD.gn
|
||||
@@ -126,6 +126,7 @@ target(link_target_type, "child") {
|
||||
"//third_party/WebKit/public:scaled_resources",
|
||||
"//third_party/WebKit/public/common",
|
||||
"//third_party/blink/public:scaled_resources",
|
||||
"//third_party/blink/public/common",
|
||||
"//third_party/ced",
|
||||
+ "//third_party/ungoogled:switches",
|
||||
"//third_party/zlib/google:compression_utils",
|
||||
"//ui/base",
|
||||
"//ui/events/gestures/blink",
|
||||
--- a/third_party/WebKit/Source/platform/BUILD.gn
|
||||
+++ b/third_party/WebKit/Source/platform/BUILD.gn
|
||||
@@ -1562,6 +1562,7 @@ jumbo_component("platform") {
|
||||
"//third_party/WebKit/public:offscreen_canvas_mojo_bindings_blink",
|
||||
--- a/third_party/blink/renderer/platform/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
|
||||
@@ -1558,6 +1558,7 @@ jumbo_component("platform") {
|
||||
"//third_party/blink/public:offscreen_canvas_mojo_bindings_blink",
|
||||
"//third_party/ced",
|
||||
"//third_party/icu",
|
||||
+ "//third_party/ungoogled:switches",
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
--- a/chrome/browser/ui/BUILD.gn
|
||||
+++ b/chrome/browser/ui/BUILD.gn
|
||||
@@ -419,10 +419,6 @@ split_static_library("ui") {
|
||||
@@ -420,10 +420,6 @@ split_static_library("ui") {
|
||||
"cocoa/omnibox/omnibox_view_mac.mm",
|
||||
"cocoa/omnibox_decoration_bubble_controller.h",
|
||||
"cocoa/omnibox_decoration_bubble_controller.mm",
|
||||
@@ -47,10 +47,10 @@
|
||||
"cocoa/page_info/page_info_bubble_controller.h",
|
||||
"cocoa/page_info/page_info_bubble_controller.mm",
|
||||
"cocoa/page_info/page_info_utils_cocoa.h",
|
||||
@@ -3250,8 +3246,6 @@ split_static_library("ui") {
|
||||
@@ -3306,8 +3302,6 @@ split_static_library("ui") {
|
||||
"views/profiles/forced_reauthentication_dialog_view.h",
|
||||
"views/profiles/signin_view_controller_delegate_views.cc",
|
||||
"views/profiles/signin_view_controller_delegate_views.h",
|
||||
"views/screen_capture_notification_ui_views.cc",
|
||||
- "views/sync/one_click_signin_dialog_view.cc",
|
||||
- "views/sync/one_click_signin_dialog_view.h",
|
||||
"views/touch_uma/touch_uma.cc",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
--- a/chrome/browser/ui/startup/bad_flags_prompt.cc
|
||||
+++ b/chrome/browser/ui/startup/bad_flags_prompt.cc
|
||||
@@ -71,7 +71,7 @@ void ShowBadFlagsPrompt(Browser* browser
|
||||
@@ -55,7 +55,7 @@ static const char* kBadFlags[] = {
|
||||
// These flags disable sandbox-related security.
|
||||
service_manager::switches::kDisableGpuSandbox,
|
||||
service_manager::switches::kDisableSeccompFilterSandbox,
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
# This also fixes local debugging with domain substitution
|
||||
# Related comment: https://bugs.chromium.org/p/chromium/issues/detail?id=710701#c14
|
||||
|
||||
--- a/third_party/WebKit/Source/devtools/BUILD.gn
|
||||
+++ b/third_party/WebKit/Source/devtools/BUILD.gn
|
||||
@@ -1114,10 +1114,8 @@ action("generate_devtools_grd") {
|
||||
--- a/third_party/blink/renderer/devtools/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/devtools/BUILD.gn
|
||||
@@ -1124,10 +1124,8 @@ action("generate_devtools_grd") {
|
||||
devtools_embedder_scripts +
|
||||
[ "$resources_out_dir/devtools_extension_api.js" ]
|
||||
|
||||
@@ -18,18 +18,8 @@
|
||||
|
||||
inputs = grd_files + devtools_image_files
|
||||
outfile = "$root_gen_dir/devtools/devtools_resources.grd"
|
||||
--- a/third_party/WebKit/Source/devtools/front_end/inspector.json
|
||||
+++ b/third_party/WebKit/Source/devtools/front_end/inspector.json
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"modules" : [
|
||||
- { "name": "screencast", "type": "remote" }
|
||||
+ { "name": "screencast" }
|
||||
],
|
||||
"extends": "devtools_app",
|
||||
"has_html": true
|
||||
--- a/third_party/WebKit/Source/devtools/front_end/audits2_worker.json
|
||||
+++ b/third_party/WebKit/Source/devtools/front_end/audits2_worker.json
|
||||
--- a/third_party/blink/renderer/devtools/front_end/audits2_worker.json
|
||||
+++ b/third_party/blink/renderer/devtools/front_end/audits2_worker.json
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"modules": [
|
||||
@@ -38,8 +28,8 @@
|
||||
+ { "name": "audits2_worker" }
|
||||
]
|
||||
}
|
||||
--- a/third_party/WebKit/Source/devtools/front_end/devtools_app.json
|
||||
+++ b/third_party/WebKit/Source/devtools/front_end/devtools_app.json
|
||||
--- a/third_party/blink/renderer/devtools/front_end/devtools_app.json
|
||||
+++ b/third_party/blink/renderer/devtools/front_end/devtools_app.json
|
||||
@@ -5,7 +5,7 @@
|
||||
{ "name": "mobile_throttling", "type": "autostart" },
|
||||
{ "name": "browser_components", "type": "autostart" },
|
||||
@@ -49,7 +39,7 @@
|
||||
{ "name": "animation" },
|
||||
{ "name": "audits2" },
|
||||
{ "name": "browser_console" },
|
||||
@@ -13,13 +13,13 @@
|
||||
@@ -13,14 +13,14 @@
|
||||
{ "name": "cookie_table" },
|
||||
{ "name": "devices" },
|
||||
{ "name": "elements" },
|
||||
@@ -60,13 +50,14 @@
|
||||
{ "name": "layers" },
|
||||
{ "name": "layer_viewer" },
|
||||
{ "name": "network" },
|
||||
{ "name": "performance_monitor" },
|
||||
- { "name": "product_registry_impl", "type": "remote" },
|
||||
+ { "name": "product_registry_impl" },
|
||||
{ "name": "resources" },
|
||||
{ "name": "security" },
|
||||
{ "name": "timeline" },
|
||||
--- a/third_party/WebKit/Source/devtools/front_end/shell.json
|
||||
+++ b/third_party/WebKit/Source/devtools/front_end/shell.json
|
||||
--- a/third_party/blink/renderer/devtools/front_end/shell.json
|
||||
+++ b/third_party/blink/renderer/devtools/front_end/shell.json
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
{ "name": "changes" },
|
||||
@@ -83,10 +74,10 @@
|
||||
- { "name": "terminal", "type": "remote" },
|
||||
+ { "name": "terminal" },
|
||||
{ "name": "text_editor" },
|
||||
{ "name": "workspace_diff" }
|
||||
]
|
||||
--- a/third_party/WebKit/Source/devtools/front_end/worker_app.json
|
||||
+++ b/third_party/WebKit/Source/devtools/front_end/worker_app.json
|
||||
{ "name": "workspace_diff" },
|
||||
{ "name": "protocol_monitor"}
|
||||
--- a/third_party/blink/renderer/devtools/front_end/worker_app.json
|
||||
+++ b/third_party/blink/renderer/devtools/front_end/worker_app.json
|
||||
@@ -12,7 +12,7 @@
|
||||
{ "name": "help" },
|
||||
{ "name": "layer_viewer" },
|
||||
|
||||
Reference in New Issue
Block a user