This repository has been archived by the owner on Mar 20, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/65.0.3325.162'
- Loading branch information
Showing
25 changed files
with
896 additions
and
1,348 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.