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

Update to 68 #157

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
378 changes: 149 additions & 229 deletions 0001-fix-building-without-safebrowsing.patch

Large diffs are not rendered by default.

67 changes: 0 additions & 67 deletions 0002-fix-building-without-reporting.patch

This file was deleted.

44 changes: 23 additions & 21 deletions 0003-disable-autofill-download-manager.patch
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
--- a/components/autofill/core/browser/autofill_download_manager.cc
+++ b/components/autofill/core/browser/autofill_download_manager.cc
@@ -158,8 +158,7 @@ std::string RequestTypeToString(Autofill
@@ -399,50 +399,6 @@ AutofillDownloadManager::GetRequestURLAn
}

GURL GetRequestUrl(AutofillDownloadManager::RequestType request_type) {
- return GURL("https://clients1.google.com/tbproxy/af/" +
- RequestTypeToString(request_type) + "?client=" + kClientName);
+ return GURL("about:blank");
}

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

bool AutofillDownloadManager::StartRequest(
const FormRequestData& request_data) {
bool AutofillDownloadManager::StartRequest(FormRequestData request_data) {
- net::URLRequestContextGetter* request_context =
- driver_->GetURLRequestContext();
- DCHECK(request_context);
- GURL request_url = GetRequestUrl(request_data.request_type);
-
- // Get the URL and method to use for this request.
- net::URLFetcher::RequestType method;
- GURL request_url;
- std::tie(request_url, method) = GetRequestURLAndMethod(request_data);
-
- // 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,
- std::unique_ptr<net::URLFetcher> fetcher = net::URLFetcher::Create(
- fetcher_id_for_unittest_++, request_url, method, 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.get(), data_use_measurement::DataUseUserData::AUTOFILL);
- 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);
- if (method == net::URLFetcher::POST) {
- fetcher->SetUploadData("text/proto", request_data.payload);
- }
-
- // Add Chrome experiment state to the request headers.
- net::HttpRequestHeaders headers;
- // Note: It's OK to pass SignedIn::kNo if it's unknown, as it does not affect
Expand All @@ -44,7 +39,14 @@
- : variations::InIncognito::kNo,
- variations::SignedIn::kNo, &headers);
- fetcher->SetExtraRequestHeaders(headers.ToString());
- fetcher->Start();
-
- // Transfer ownership of the fetcher into url_fetchers_. Temporarily hang
- // onto the raw pointer to use it as a key and to kick off the request;
- // transferring ownership (std::move) invalidates the |fetcher| variable.
- auto* raw_fetcher = fetcher.get();
- url_fetchers_[raw_fetcher] =
- std::make_pair(std::move(fetcher), std::move(request_data));
- raw_fetcher->Start();
-
return true;
}
Expand Down
70 changes: 35 additions & 35 deletions 0004-disable-google-url-tracker.patch
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
--- a/components/google/core/browser/google_url_tracker.cc
+++ b/components/google/core/browser/google_url_tracker.cc
@@ -26,9 +26,9 @@

@@ -25,9 +25,9 @@
#include "services/network/public/cpp/simple_url_loader.h"

const char GoogleURLTracker::kDefaultGoogleHomepage[] =
- "https://www.google.com/";
+ "";
const char GoogleURLTracker::kSearchDomainCheckURL[] =
- "https://www.google.com/searchdomaincheck?format=domain&type=chrome";
+ "";
const base::Feature GoogleURLTracker::kNoSearchDomainCheck{
"NoSearchDomainCheck", base::FEATURE_DISABLED_BY_DEFAULT};

GoogleURLTracker::GoogleURLTracker(
std::unique_ptr<GoogleURLTrackerClient> client,
@@ -145,83 +145,4 @@ void GoogleURLTracker::FinishSleep() {
@@ -146,83 +146,4 @@ void GoogleURLTracker::FinishSleep() {
}

void GoogleURLTracker::StartFetchIfDesirable() {
- // Bail if a fetch isn't appropriate right now. This function will be called
- // again each time one of the preconditions changes, so we'll fetch
void GoogleURLTracker::StartLoadIfDesirable() {
- // Bail if a load isn't appropriate right now. This function will be called
- // again each time one of the preconditions changes, so we'll load
- // immediately once all of them are met.
- //
- // See comments in header on the class, on RequestServerCheck(), and on the
- // various members here for more detail on exactly what the conditions are.
- if (in_startup_sleep_ || already_fetched_ || !need_to_fetch_)
- if (in_startup_sleep_ || already_loaded_ || !need_to_load_)
- return;
-
- // Some switches should disable the Google URL tracker entirely. If we can't
- // do background networking, we can't do the necessary fetch, and if the user
- // do background networking, we can't do the necessary load, and if the user
- // specified a Google base URL manually, we shouldn't bother to look up any
- // alternatives or offer to switch to them.
- if (!client_->IsBackgroundNetworkingEnabled() ||
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kGoogleBaseURL))
- return;
-
- already_fetched_ = true;
- already_loaded_ = true;
- net::NetworkTrafficAnnotationTag traffic_annotation =
- net::DefineNetworkTrafficAnnotation("google_url_tracker", R"(
- semantics {
Expand Down Expand Up @@ -69,30 +69,30 @@
- "not be Google. But there is no policy that controls navigation "
- "error resolution."
- })");
- fetcher_ =
- net::URLFetcher::Create(fetcher_id_, GURL(kSearchDomainCheckURL),
- net::URLFetcher::GET, this, traffic_annotation);
- data_use_measurement::DataUseUserData::AttachToFetcher(
- fetcher_.get(),
- data_use_measurement::DataUseUserData::GOOGLE_URL_TRACKER);
- ++fetcher_id_;
- // We don't want this fetch to set new entries in the cache or cookies, lest
- auto resource_request = std::make_unique<network::ResourceRequest>();
- resource_request->url = GURL(kSearchDomainCheckURL);
- // We don't want this load to set new entries in the cache or cookies, lest
- // we alarm the user.
- fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE |
- net::LOAD_DO_NOT_SAVE_COOKIES);
- fetcher_->SetRequestContext(client_->GetRequestContext());
-
- // Configure to retry at most kMaxRetries times for 5xx errors.
- resource_request->load_flags =
- (net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SAVE_COOKIES);
- simple_loader_ = network::SimpleURLLoader::Create(std::move(resource_request),
- traffic_annotation);
- // Configure to retry at most kMaxRetries times for 5xx errors and network
- // changes.
- // A network change can propagate through Chrome in various stages, so it's
- // possible for this code to be reached via OnNetworkChanged(), and then have
- // the load we kick off be canceled due to e.g. the DNS server changing at a
- // later time. In general it's not possible to ensure that by the time we
- // reach here any requests we start won't be canceled in this fashion, so
- // retrying is the best we can do.
- static const int kMaxRetries = 5;
- fetcher_->SetMaxRetriesOn5xx(kMaxRetries);
-
- // Also retry kMaxRetries times on network change errors. A network change can
- // propagate through Chrome in various stages, so it's possible for this code
- // to be reached via OnNetworkChanged(), and then have the fetch we kick off
- // be canceled due to e.g. the DNS server changing at a later time. In general
- // it's not possible to ensure that by the time we reach here any requests we
- // start won't be canceled in this fashion, so retrying is the best we can do.
- fetcher_->SetAutomaticallyRetryOnNetworkChanges(kMaxRetries);
-
- fetcher_->Start();
- simple_loader_->SetRetryOptions(
- kMaxRetries,
- network::SimpleURLLoader::RetryMode::RETRY_ON_5XX |
- network::SimpleURLLoader::RetryMode::RETRY_ON_NETWORK_CHANGE);
- simple_loader_->DownloadToString(
- client_->GetURLLoaderFactory(),
- base::BindOnce(&GoogleURLTracker::OnURLLoaderComplete,
- base::Unretained(this)),
- 2 * 1024 /* max_body_size */);
}
14 changes: 7 additions & 7 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
@@ -421,11 +421,6 @@ void ComponentLoader::AddWebStoreApp() {
@@ -420,11 +420,6 @@ void ComponentLoader::AddWebStoreApp() {
if (!IsNormalSession())
return;
#endif
Expand All @@ -12,10 +12,10 @@
}

scoped_refptr<const Extension> ComponentLoader::CreateExtension(
@@ -480,11 +475,6 @@ void ComponentLoader::AddDefaultComponen
Add(IDR_BOOKMARKS_MANIFEST,
base::FilePath(FILE_PATH_LITERAL("bookmark_manager")));
@@ -467,11 +462,6 @@ void ComponentLoader::AddDefaultComponen
}
#else // defined(OS_CHROMEOS)
DCHECK(!skip_session_components);
-#if BUILDFLAG(ENABLE_PRINTING)
- // Cloud Print component app. Not required on Chrome OS.
- Add(IDR_CLOUDPRINT_MANIFEST,
Expand All @@ -24,7 +24,7 @@
#endif // defined(OS_CHROMEOS)

if (!skip_session_components) {
@@ -560,13 +550,6 @@ void ComponentLoader::AddDefaultComponen
@@ -547,13 +537,6 @@ void ComponentLoader::AddDefaultComponen

AddHangoutServicesExtension();
AddImageLoaderExtension();
Expand All @@ -40,7 +40,7 @@
#if defined(OS_CHROMEOS)
--- a/chrome/browser/extensions/external_component_loader.cc
+++ b/chrome/browser/extensions/external_component_loader.cc
@@ -31,9 +31,6 @@ ExternalComponentLoader::~ExternalCompon
@@ -32,9 +32,6 @@ ExternalComponentLoader::~ExternalCompon

void ExternalComponentLoader::StartLoading() {
auto prefs = std::make_unique<base::DictionaryValue>();
Expand All @@ -60,7 +60,7 @@
- MaybeAppendAuthUserParameter(approval_->authuser, &download_url_);
-
- base::FilePath user_data_dir;
- PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
- base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
- base::FilePath download_path = user_data_dir.Append(kWebstoreDownloadFolder);
-
- base::FilePath download_directory(g_download_directory_for_tests ?
Expand Down
Loading