Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release/65.0.3325.162'
Browse files Browse the repository at this point in the history
  • Loading branch information
gcarq committed Mar 15, 2018
2 parents 021d637 + d61fb35 commit b8f3ee8
Show file tree
Hide file tree
Showing 25 changed files with 896 additions and 1,348 deletions.
467 changes: 198 additions & 269 deletions 0001-fix-building-without-safebrowsing.patch

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions 0002-fix-building-without-reporting.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Fix building with enable_reporting=false
# In profile_impl_io_data.h/cc and reporting_service_proxy.cc the devs forgot to check if reporting was enabled before using a reporting feature
# In printer_handler.cc, due to some combination of build flags used in the ungoogled-chromium build, MakeUnique was not pulled in

--- a/chrome/browser/ui/webui/print_preview/printer_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/printer_handler.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/ui/webui/print_preview/extension_printer_handler.h"
#include "chrome/browser/ui/webui/print_preview/pdf_printer_handler.h"
#include "chrome/common/features.h"
+#include "base/memory/ptr_util.h"

#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
#include "chrome/browser/ui/webui/print_preview/privet_printer_handler.h"
--- a/content/browser/net/reporting_service_proxy.cc
+++ b/content/browser/net/reporting_service_proxy.cc
@@ -102,6 +102,7 @@ class ReportingServiceProxyImpl : public
const std::string& group,
const std::string& type,
std::unique_ptr<base::Value> body) {
+#if BUILDFLAG(ENABLE_REPORTING)
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));
+#endif
}

scoped_refptr<net::URLRequestContextGetter> request_context_getter_;
--- a/chrome/browser/profiles/profile_impl_io_data.h
+++ b/chrome/browser/profiles/profile_impl_io_data.h
@@ -177,6 +177,7 @@ class ProfileImplIOData : public Profile
const StoragePartitionDescriptor& partition_descriptor) const override;
chrome_browser_net::Predictor* GetPredictor() override;

+#if BUILDFLAG(ENABLE_REPORTING)
// Returns a net::ReportingService, if reporting should be enabled. Otherwise,
// returns nullptr.
// TODO(mmenke): Remove once URLRequestContextBuilders are always used to
@@ -187,6 +188,7 @@ class ProfileImplIOData : public Profile
// Returns a net::ReportingPolicy, if reporting should be enabled. Otherwise,
// returns nullptr.
static std::unique_ptr<net::ReportingPolicy> MaybeCreateReportingPolicy();
+#endif

// Lazy initialization params.
mutable std::unique_ptr<LazyParams> lazy_params_;
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -480,7 +480,9 @@ void ProfileImplIOData::InitializeIntern
builder, std::move(request_interceptors),
std::move(profile_params->protocol_handler_interceptor));

+#if BUILDFLAG(ENABLE_REPORTING)
builder->set_reporting_policy(MaybeCreateReportingPolicy());
+#endif
}

void ProfileImplIOData::OnMainRequestContextCreated(
@@ -615,7 +617,9 @@ net::URLRequestContext* ProfileImplIODat
context->host_resolver()));
context->SetJobFactory(std::move(top_job_factory));

+#if BUILDFLAG(ENABLE_REPORTING)
context->SetReportingService(MaybeCreateReportingService(context));
+#endif

return context;
}
@@ -705,6 +709,7 @@ chrome_browser_net::Predictor* ProfileIm
return predictor_.get();
}

+#if BUILDFLAG(ENABLE_REPORTING)
std::unique_ptr<net::ReportingService>
ProfileImplIOData::MaybeCreateReportingService(
net::URLRequestContext* url_request_context) const {
@@ -723,3 +728,4 @@ ProfileImplIOData::MaybeCreateReportingP

return base::MakeUnique<net::ReportingPolicy>();
}
+#endif
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -637,7 +637,9 @@ void ProfileIOData::AppRequestContext::S
void ProfileIOData::AppRequestContext::SetReportingService(
std::unique_ptr<net::ReportingService> reporting_service) {
reporting_service_ = std::move(reporting_service);
+#if BUILDFLAG(ENABLE_REPORTING)
set_reporting_service(reporting_service_.get());
+#endif
}

ProfileIOData::AppRequestContext::~AppRequestContext() {
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
@@ -255,10 +255,12 @@ void ClearReportingCacheOnIOThread(
const base::Callback<bool(const GURL&)>& origin_filter) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);

+#if BUILDFLAG(ENABLE_REPORTING)
net::ReportingService* service =
context->GetURLRequestContext()->reporting_service();
if (service)
service->RemoveBrowsingData(data_type_mask, origin_filter);
+#endif
}

void ClearNetworkErrorLoggingOnIOThread(
44 changes: 11 additions & 33 deletions 0003-disable-autofill-download-manager.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,19 @@
}

std::ostream& operator<<(std::ostream& out,
@@ -299,37 +298,6 @@ bool AutofillDownloadManager::StartUploa
@@ -299,6 +298,7 @@ bool AutofillDownloadManager::StartUploa

bool AutofillDownloadManager::StartRequest(
const FormRequestData& request_data) {
- net::URLRequestContextGetter* request_context =
- driver_->GetURLRequestContext();
- DCHECK(request_context);
- GURL request_url = GetRequestUrl(request_data.request_type);
-
- // Id is ignored for regular chrome, in unit test id's for fake fetcher
- // factory will be 0, 1, 2, ...
- std::unique_ptr<net::URLFetcher> owned_fetcher = net::URLFetcher::Create(
- fetcher_id_for_unittest_++, request_url, net::URLFetcher::POST, this,
- GetNetworkTrafficAnnotation(request_data.request_type));
- net::URLFetcher* fetcher = owned_fetcher.get();
- data_use_measurement::DataUseUserData::AttachToFetcher(
- fetcher, data_use_measurement::DataUseUserData::AUTOFILL);
- url_fetchers_[fetcher] =
- std::make_pair(std::move(owned_fetcher), request_data);
- fetcher->SetAutomaticallyRetryOn5xx(false);
- fetcher->SetRequestContext(request_context);
- fetcher->SetUploadData("text/proto", request_data.payload);
- fetcher->SetLoadFlags(net::LOAD_DO_NOT_SAVE_COOKIES |
- net::LOAD_DO_NOT_SEND_COOKIES);
- // Add Chrome experiment state to the request headers.
- net::HttpRequestHeaders headers;
- // Note: It's OK to pass |is_signed_in| false if it's unknown, as it does
- // not affect transmission of experiments coming from the variations server.
- bool is_signed_in = false;
- variations::AppendVariationHeaders(fetcher->GetOriginalURL(),
- driver_->IsIncognito(), false,
- is_signed_in, &headers);
- fetcher->SetExtraRequestHeaders(headers.ToString());
- fetcher->Start();
-
+#if 0
net::URLRequestContextGetter* request_context =
driver_->GetURLRequestContext();
DCHECK(request_context);
@@ -330,6 +330,7 @@ bool AutofillDownloadManager::StartReque
variations::SignedIn::kNo, &headers);
fetcher->SetExtraRequestHeaders(headers.ToString());
fetcher->Start();
+#endif

return true;
}

18 changes: 7 additions & 11 deletions 0005-disable-default-extensions.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/chrome/browser/extensions/component_loader.cc
+++ b/chrome/browser/extensions/component_loader.cc
@@ -441,11 +441,6 @@ void ComponentLoader::AddWebStoreApp() {
@@ -421,11 +421,6 @@ void ComponentLoader::AddWebStoreApp() {
if (!IsNormalSession())
return;
#endif
Expand All @@ -12,7 +12,7 @@
}

scoped_refptr<const Extension> ComponentLoader::CreateExtension(
@@ -500,11 +495,6 @@ void ComponentLoader::AddDefaultComponen
@@ -480,11 +475,6 @@ void ComponentLoader::AddDefaultComponen
Add(IDR_BOOKMARKS_MANIFEST,
base::FilePath(FILE_PATH_LITERAL("bookmark_manager")));
}
Expand All @@ -24,9 +24,9 @@
#endif // defined(OS_CHROMEOS)

if (!skip_session_components) {
@@ -582,13 +572,6 @@ void ComponentLoader::AddDefaultComponen
AddHotwordAudioVerificationApp();
AddHotwordHelperExtension();
@@ -560,13 +550,6 @@ void ComponentLoader::AddDefaultComponen

AddHangoutServicesExtension();
AddImageLoaderExtension();
-
- bool install_feedback = enable_background_extensions_during_testing;
Expand All @@ -40,16 +40,13 @@
#if defined(OS_CHROMEOS)
--- a/chrome/browser/extensions/external_component_loader.cc
+++ b/chrome/browser/extensions/external_component_loader.cc
@@ -34,12 +34,6 @@ ExternalComponentLoader::~ExternalCompon
@@ -31,9 +31,6 @@ ExternalComponentLoader::~ExternalCompon

void ExternalComponentLoader::StartLoading() {
auto prefs = std::make_unique<base::DictionaryValue>();
-#if defined(GOOGLE_CHROME_BUILD)
- AddExternalExtension(extension_misc::kInAppPaymentsSupportAppId, prefs.get());
-#endif // defined(GOOGLE_CHROME_BUILD)
-
- if (HotwordServiceFactory::IsHotwordAllowed(profile_))
- AddExternalExtension(extension_misc::kHotwordSharedModuleId, prefs.get());

#if defined(OS_CHROMEOS)
{
Expand Down Expand Up @@ -89,11 +86,10 @@
void WebstoreInstaller::ReportFailure(const std::string& error,
--- a/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc
+++ b/chrome/browser/extensions/component_extensions_whitelist/whitelist.cc
@@ -26,8 +26,6 @@ namespace extensions {
@@ -26,7 +26,6 @@ namespace extensions {

bool IsComponentExtensionWhitelisted(const std::string& extension_id) {
const char* const kAllowed[] = {
- extension_misc::kHotwordSharedModuleId,
- extension_misc::kInAppPaymentsSupportAppId,
extension_misc::kMediaRouterStableExtensionId,
extension_misc::kPdfExtensionId,
Expand Down
28 changes: 14 additions & 14 deletions 0006-modify-default-prefs.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -866,7 +866,7 @@ void ChromeContentBrowserClient::Registe
@@ -859,7 +859,7 @@ void ChromeContentBrowserClient::Registe
void ChromeContentBrowserClient::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(prefs::kDisable3DAPIs, false);
Expand All @@ -11,12 +11,12 @@

--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -62,11 +62,11 @@ void RegisterBrowserUserPrefs(user_prefs
@@ -59,11 +59,11 @@ void RegisterBrowserUserPrefs(user_prefs
registry->RegisterBooleanPref(prefs::kWebAppCreateInAppsMenu, true);
registry->RegisterBooleanPref(prefs::kWebAppCreateInQuickLaunchBar, true);
registry->RegisterBooleanPref(
prefs::kEnableTranslate,
- true,
+ false,
- prefs::kOfferTranslateEnabled, true,
+ prefs::kOfferTranslateEnabled, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
registry->RegisterStringPref(prefs::kCloudPrintEmail, std::string());
registry->RegisterBooleanPref(prefs::kCloudPrintProxyEnabled, true);
Expand Down Expand Up @@ -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
@@ -80,7 +80,7 @@ void CookieSettings::GetCookieSettings(
@@ -88,7 +88,7 @@ void CookieSettings::GetCookieSettings(
void CookieSettings::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
Expand All @@ -82,7 +82,7 @@

--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -281,7 +281,7 @@ void AutofillManager::RegisterProfilePre
@@ -216,7 +216,7 @@ void AutofillManager::RegisterProfilePre
registry->RegisterIntegerPref(
prefs::kAutofillCreditCardSigninPromoImpressionCount, 0);
registry->RegisterBooleanPref(
Expand All @@ -104,18 +104,18 @@
</dialog>
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -610,7 +610,7 @@ void IOThread::RegisterPrefs(PrefRegistr
@@ -620,7 +620,7 @@ void IOThread::RegisterPrefs(PrefRegistr
std::string());
registry->RegisterBooleanPref(prefs::kEnableReferrers, true);
data_reduction_proxy::RegisterPrefs(registry);
- registry->RegisterBooleanPref(prefs::kBuiltInDnsClientEnabled, true);
+ registry->RegisterBooleanPref(prefs::kBuiltInDnsClientEnabled, false);
registry->RegisterBooleanPref(prefs::kQuickCheckEnabled, true);
registry->RegisterBooleanPref(prefs::kPacHttpsUrlStrippingEnabled, true);
}
#if defined(OS_POSIX)
--- a/chrome/browser/signin/signin_promo.cc
+++ b/chrome/browser/signin/signin_promo.cc
@@ -328,8 +328,8 @@ void ForceWebBasedSigninFlowForTesting(b
@@ -390,8 +390,8 @@ void ForceWebBasedSigninFlowForTesting(b
void RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterIntegerPref(prefs::kSignInPromoStartupCount, 0);
Expand Down Expand Up @@ -145,7 +145,7 @@
prefs::kShowManagedBookmarksInBookmarkBar,
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -136,7 +136,7 @@ const char Profile::kNoHostedDomainFound
@@ -138,7 +138,7 @@ const char Profile::kNoHostedDomainFound
void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
prefs::kSearchSuggestEnabled,
Expand All @@ -167,7 +167,7 @@
prefs::kCloudPrintXmppPingEnabled, false);
--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
+++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui.cc
@@ -143,10 +143,6 @@ void LocalDiscoveryUI::RegisterProfilePr
@@ -144,10 +144,6 @@ void LocalDiscoveryUI::RegisterProfilePr
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
prefs::kLocalDiscoveryNotificationsEnabled,
Expand Down Expand Up @@ -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
@@ -334,9 +334,9 @@ void RegisterProfilePrefs(PrefRegistrySi
registry->RegisterBooleanPref(
prefs::kSafeBrowsingSawInterstitialScoutReporting, false);
registry->RegisterBooleanPref(
Expand All @@ -211,7 +211,7 @@
false);
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -207,10 +207,10 @@ PasswordFormManager* FindMatchedManager(
@@ -236,10 +236,10 @@ PasswordFormManager* FindMatchedManager(
void PasswordManager::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
registry->RegisterBooleanPref(
Expand Down
49 changes: 10 additions & 39 deletions 0007-disable-web-resource-service.patch
Original file line number Diff line number Diff line change
@@ -1,47 +1,18 @@
--- a/components/web_resource/web_resource_service.cc
+++ b/components/web_resource/web_resource_service.cc
@@ -126,44 +126,7 @@ bool WebResourceService::GetFetchSchedul
@@ -126,6 +126,7 @@ bool WebResourceService::GetFetchSchedul
// Initializes the fetching of data from the resource server. Data
// load calls OnURLFetchComplete.
void WebResourceService::StartFetch() {
- // Set to false so that next fetch can be scheduled after this fetch or
- // if we recieve notification that resource is allowed.
- fetch_scheduled_ = false;
- // Check whether fetching is allowed.
- if (!resource_request_allowed_notifier_->ResourceRequestsAllowed())
- return;
-
- // First, put our next cache load on the MessageLoop.
- ScheduleFetch(cache_update_delay_ms_);
-
- // Set cache update time in preferences.
- prefs_->SetString(last_update_time_pref_name_,
- base::DoubleToString(base::Time::Now().ToDoubleT()));
-
- // If we are still fetching data, exit.
- if (in_fetch_)
- return;
- in_fetch_ = true;
-
- GURL web_resource_server =
- application_locale_.empty()
- ? web_resource_server_
- : google_util::AppendGoogleLocaleParam(web_resource_server_,
- application_locale_);
-
- DVLOG(1) << "WebResourceService StartFetch " << web_resource_server;
- url_fetcher_ = net::URLFetcher::Create(
- web_resource_server, net::URLFetcher::GET, this, traffic_annotation_);
- data_use_measurement::DataUseUserData::AttachToFetcher(
- url_fetcher_.get(),
- data_use_measurement::DataUseUserData::WEB_RESOURCE_SERVICE);
- // Do not let url fetcher affect existing state in system context
- // (by setting cookies, for example).
- url_fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE |
- net::LOAD_DO_NOT_SEND_COOKIES |
- net::LOAD_DO_NOT_SAVE_COOKIES);
- url_fetcher_->SetRequestContext(request_context_.get());
- url_fetcher_->Start();
+#if 0
// Set to false so that next fetch can be scheduled after this fetch or
// if we recieve notification that resource is allowed.
fetch_scheduled_ = false;
@@ -164,6 +165,8 @@ void WebResourceService::StartFetch() {
net::LOAD_DO_NOT_SAVE_COOKIES);
url_fetcher_->SetRequestContext(request_context_.get());
url_fetcher_->Start();
+#endif
+ in_fetch_ = false;
}

Expand Down

0 comments on commit b8f3ee8

Please sign in to comment.