mirror of
https://github.com/morgan9e/helium
synced 2026-04-14 08:24:04 +09:00
patches/iridium: Update for 67
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user