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

Unified Diff: sync/internal_api/http_bridge.cc

Issue 2046493007: [Sync] Make chrome sync response compression as default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 6 months 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
« no previous file with comments | « sync/BUILD.gn ('k') | sync/internal_api/http_bridge_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/http_bridge.cc
diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc
index 4675e2e1047acf5711a10328cc0a518704eda1ad..24e8413fedfa427a5bd04f37159a2c50a5685a7b 100644
--- a/sync/internal_api/http_bridge.cc
+++ b/sync/internal_api/http_bridge.cc
@@ -12,12 +12,10 @@
#include "base/bit_cast.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
-#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
#include "net/base/load_flags.h"
@@ -47,12 +45,6 @@ void LogTimeout(bool timed_out) {
UMA_HISTOGRAM_BOOLEAN("Sync.URLFetchTimedOut", timed_out);
}
-bool IsSyncHttpContentCompressionEnabled() {
- const std::string group_name =
- base::FieldTrialList::FindFullName("SyncHttpContentCompression");
- return StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
-}
-
void RecordSyncRequestContentLengthHistograms(int64_t compressed_content_length,
int64_t original_content_length) {
UMA_HISTOGRAM_COUNTS("Sync.RequestContentLength.Compressed",
@@ -253,13 +245,6 @@ void HttpBridge::MakeAsynchronousPost() {
fetch_state_.url_poster->SetRequestContext(request_context_getter_.get());
fetch_state_.url_poster->SetExtraRequestHeaders(extra_headers_);
- if (!IsSyncHttpContentCompressionEnabled()) {
- // We set "accept-encoding" here to avoid URLRequestHttpJob adding "gzip"
- // into "accept-encoding" later.
- fetch_state_.url_poster->AddExtraRequestHeader(base::StringPrintf(
- "%s: %s", net::HttpRequestHeaders::kAcceptEncoding, "deflate"));
- }
-
fetch_state_.url_poster->SetUploadData(content_type_, request_content_);
RecordSyncRequestContentLengthHistograms(request_content_.size(),
request_content_.size());
« no previous file with comments | « sync/BUILD.gn ('k') | sync/internal_api/http_bridge_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698