Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc

Issue 2577413002: Revert of Cleanup DataReductionProxy (DRP) Brotli code (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
index d2991d7df16679a63a812276421bb489c34afa91..d4f6ae26af03f4a97316ffbc0b7e5f5bbc136cb6 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
@@ -85,15 +85,9 @@
}
void DataReductionProxyRequestOptions::Init() {
- DCHECK(thread_checker_.CalledOnValidThread());
key_ = GetDefaultKey(),
UpdateCredentials();
UpdateExperiments();
-}
-
-std::string DataReductionProxyRequestOptions::GetHeaderValueForTesting() const {
- DCHECK(thread_checker_.CalledOnValidThread());
- return header_value_;
}
void DataReductionProxyRequestOptions::UpdateExperiments() {
@@ -139,19 +133,16 @@
}
base::Time DataReductionProxyRequestOptions::Now() const {
- DCHECK(thread_checker_.CalledOnValidThread());
return base::Time::Now();
}
void DataReductionProxyRequestOptions::RandBytes(void* output,
size_t length) const {
- DCHECK(thread_checker_.CalledOnValidThread());
crypto::RandBytes(output, length);
}
void DataReductionProxyRequestOptions::AddRequestHeader(
net::HttpRequestHeaders* request_headers) {
- DCHECK(thread_checker_.CalledOnValidThread());
base::Time now = Now();
// Authorization credentials must be regenerated if they are expired.
if (!use_assigned_credentials_ && (now > credentials_expiration_time_))
@@ -216,12 +207,10 @@
}
void DataReductionProxyRequestOptions::Invalidate() {
- DCHECK(thread_checker_.CalledOnValidThread());
SetSecureSession(std::string());
}
std::string DataReductionProxyRequestOptions::GetDefaultKey() const {
- DCHECK(thread_checker_.CalledOnValidThread());
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
std::string key =

Powered by Google App Engine
This is Rietveld 408576698