OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "android_webview/browser/aw_browser_context.h" | 5 #include "android_webview/browser/aw_browser_context.h" |
6 | 6 |
7 #include <string> | |
7 #include <utility> | 8 #include <utility> |
8 | 9 |
9 #include "android_webview/browser/aw_browser_policy_connector.h" | 10 #include "android_webview/browser/aw_browser_policy_connector.h" |
10 #include "android_webview/browser/aw_form_database_service.h" | 11 #include "android_webview/browser/aw_form_database_service.h" |
11 #include "android_webview/browser/aw_metrics_service_client.h" | 12 #include "android_webview/browser/aw_metrics_service_client.h" |
12 #include "android_webview/browser/aw_permission_manager.h" | 13 #include "android_webview/browser/aw_permission_manager.h" |
13 #include "android_webview/browser/aw_quota_manager_bridge.h" | 14 #include "android_webview/browser/aw_quota_manager_bridge.h" |
14 #include "android_webview/browser/aw_resource_context.h" | 15 #include "android_webview/browser/aw_resource_context.h" |
15 #include "android_webview/browser/jni_dependency_factory.h" | 16 #include "android_webview/browser/jni_dependency_factory.h" |
16 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 17 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
205 url_request_context_getter_ = new AwURLRequestContextGetter( | 206 url_request_context_getter_ = new AwURLRequestContextGetter( |
206 cache_path, CreateProxyConfigService(), user_pref_service_.get()); | 207 cache_path, CreateProxyConfigService(), user_pref_service_.get()); |
207 | 208 |
208 data_reduction_proxy_io_data_.reset( | 209 data_reduction_proxy_io_data_.reset( |
209 new data_reduction_proxy::DataReductionProxyIOData( | 210 new data_reduction_proxy::DataReductionProxyIOData( |
210 data_reduction_proxy::Client::WEBVIEW_ANDROID, | 211 data_reduction_proxy::Client::WEBVIEW_ANDROID, |
211 data_reduction_proxy::DataReductionProxyParams::kAllowed, | 212 data_reduction_proxy::DataReductionProxyParams::kAllowed, |
212 url_request_context_getter_->GetNetLog(), | 213 url_request_context_getter_->GetNetLog(), |
213 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 214 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
214 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 215 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
215 false /* enable */, | 216 false /* enable */, GetUserAgent(), std::string())); |
tbansal1
2016/06/29 17:58:25
Fix cronet too :)
| |
216 GetUserAgent())); | |
217 data_reduction_proxy_settings_.reset( | 217 data_reduction_proxy_settings_.reset( |
218 new data_reduction_proxy::DataReductionProxySettings()); | 218 new data_reduction_proxy::DataReductionProxySettings()); |
219 std::unique_ptr<data_reduction_proxy::DataStore> store( | 219 std::unique_ptr<data_reduction_proxy::DataStore> store( |
220 new data_reduction_proxy::DataStore()); | 220 new data_reduction_proxy::DataStore()); |
221 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); | 221 base::SequencedWorkerPool* pool = BrowserThread::GetBlockingPool(); |
222 scoped_refptr<base::SequencedTaskRunner> db_task_runner = | 222 scoped_refptr<base::SequencedTaskRunner> db_task_runner = |
223 pool->GetSequencedTaskRunnerWithShutdownBehavior( | 223 pool->GetSequencedTaskRunnerWithShutdownBehavior( |
224 pool->GetSequenceToken(), | 224 pool->GetSequenceToken(), |
225 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); | 225 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
226 data_reduction_proxy_service_.reset( | 226 data_reduction_proxy_service_.reset( |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
457 return; | 457 return; |
458 // We don't care about commit_delay for now. It is just a dummy value. | 458 // We don't care about commit_delay for now. It is just a dummy value. |
459 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); | 459 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); |
460 data_reduction_proxy_service->EnableCompressionStatisticsLogging( | 460 data_reduction_proxy_service->EnableCompressionStatisticsLogging( |
461 user_pref_service_.get(), | 461 user_pref_service_.get(), |
462 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 462 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
463 commit_delay); | 463 commit_delay); |
464 } | 464 } |
465 | 465 |
466 } // namespace android_webview | 466 } // namespace android_webview |
OLD | NEW |