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

Side by Side Diff: components/cronet/android/cronet_data_reduction_proxy.cc

Issue 2103223002: Adding version info to the client config request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/cronet/android/cronet_data_reduction_proxy.h" 5 #include "components/cronet/android/cronet_data_reduction_proxy.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 base::CommandLine::ForCurrentProcess()); 85 base::CommandLine::ForCurrentProcess());
86 prefs_ = CreatePrefService(); 86 prefs_ = CreatePrefService();
87 // In Cronet, the Data Reduction Proxy's UI classes are Created on Cronet's 87 // In Cronet, the Data Reduction Proxy's UI classes are Created on Cronet's
88 // network thread. 88 // network thread.
89 settings_.reset( 89 settings_.reset(
90 new data_reduction_proxy::DataReductionProxySettings()); 90 new data_reduction_proxy::DataReductionProxySettings());
91 io_data_.reset(new data_reduction_proxy::DataReductionProxyIOData( 91 io_data_.reset(new data_reduction_proxy::DataReductionProxyIOData(
92 data_reduction_proxy::Client::CRONET_ANDROID, 92 data_reduction_proxy::Client::CRONET_ANDROID,
93 data_reduction_proxy::DataReductionProxyParams::kAllowed | 93 data_reduction_proxy::DataReductionProxyParams::kAllowed |
94 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed, 94 data_reduction_proxy::DataReductionProxyParams::kFallbackAllowed,
95 net_log, task_runner, task_runner, false, user_agent)); 95 net_log, task_runner, task_runner, false, user_agent, std::string()));
xunjieli 2016/06/30 13:55:37 You can get a Chromium version string CRONET_VERSI
RyanSturm 2016/06/30 15:09:11 This string is for channel (dev, beta, stable). I
96 io_data_->request_options()->SetKeyOnIO(key); 96 io_data_->request_options()->SetKeyOnIO(key);
97 } 97 }
98 98
99 CronetDataReductionProxy::~CronetDataReductionProxy() { 99 CronetDataReductionProxy::~CronetDataReductionProxy() {
100 io_data_->ShutdownOnUIThread(); 100 io_data_->ShutdownOnUIThread();
101 } 101 }
102 102
103 std::unique_ptr<net::NetworkDelegate> 103 std::unique_ptr<net::NetworkDelegate>
104 CronetDataReductionProxy::CreateNetworkDelegate( 104 CronetDataReductionProxy::CreateNetworkDelegate(
105 std::unique_ptr<net::NetworkDelegate> wrapped_network_delegate) { 105 std::unique_ptr<net::NetworkDelegate> wrapped_network_delegate) {
(...skipping 25 matching lines...) Expand all
131 io_data_->SetDataReductionProxyService( 131 io_data_->SetDataReductionProxyService(
132 data_reduction_proxy_service->GetWeakPtr()); 132 data_reduction_proxy_service->GetWeakPtr());
133 settings_->InitDataReductionProxySettings( 133 settings_->InitDataReductionProxySettings(
134 kDataReductionProxyEnabled, prefs_.get(), io_data_.get(), 134 kDataReductionProxyEnabled, prefs_.get(), io_data_.get(),
135 std::move(data_reduction_proxy_service)); 135 std::move(data_reduction_proxy_service));
136 settings_->SetDataReductionProxyEnabled(enable); 136 settings_->SetDataReductionProxyEnabled(enable);
137 settings_->MaybeActivateDataReductionProxy(true); 137 settings_->MaybeActivateDataReductionProxy(true);
138 } 138 }
139 139
140 } // namespace cronet 140 } // namespace cronet
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698