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 "android_webview/browser/aw_form_database_service.h" | 7 #include "android_webview/browser/aw_form_database_service.h" |
8 #include "android_webview/browser/aw_permission_manager.h" | 8 #include "android_webview/browser/aw_permission_manager.h" |
9 #include "android_webview/browser/aw_pref_store.h" | 9 #include "android_webview/browser/aw_pref_store.h" |
10 #include "android_webview/browser/aw_quota_manager_bridge.h" | 10 #include "android_webview/browser/aw_quota_manager_bridge.h" |
11 #include "android_webview/browser/aw_resource_context.h" | 11 #include "android_webview/browser/aw_resource_context.h" |
12 #include "android_webview/browser/jni_dependency_factory.h" | 12 #include "android_webview/browser/jni_dependency_factory.h" |
13 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 13 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
14 #include "android_webview/browser/net/init_native_callback.h" | 14 #include "android_webview/browser/net/init_native_callback.h" |
| 15 #include "android_webview/common/aw_content_client.h" |
15 #include "base/base_paths_android.h" | 16 #include "base/base_paths_android.h" |
16 #include "base/bind.h" | 17 #include "base/bind.h" |
17 #include "base/path_service.h" | 18 #include "base/path_service.h" |
18 #include "base/prefs/pref_registry_simple.h" | 19 #include "base/prefs/pref_registry_simple.h" |
19 #include "base/prefs/pref_service.h" | 20 #include "base/prefs/pref_service.h" |
20 #include "base/prefs/pref_service_factory.h" | 21 #include "base/prefs/pref_service_factory.h" |
21 #include "components/autofill/core/common/autofill_pref_names.h" | 22 #include "components/autofill/core/common/autofill_pref_names.h" |
22 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp
ression_stats.h" | 23 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_comp
ression_stats.h" |
23 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 24 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
24 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" | 25 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_pref
s.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 cache_path, cookie_store_.get(), | 155 cache_path, cookie_store_.get(), |
155 make_scoped_ptr(CreateProxyConfigService()).Pass()); | 156 make_scoped_ptr(CreateProxyConfigService()).Pass()); |
156 | 157 |
157 data_reduction_proxy_io_data_.reset( | 158 data_reduction_proxy_io_data_.reset( |
158 new data_reduction_proxy::DataReductionProxyIOData( | 159 new data_reduction_proxy::DataReductionProxyIOData( |
159 data_reduction_proxy::Client::WEBVIEW_ANDROID, | 160 data_reduction_proxy::Client::WEBVIEW_ANDROID, |
160 data_reduction_proxy::DataReductionProxyParams::kAllowed, | 161 data_reduction_proxy::DataReductionProxyParams::kAllowed, |
161 url_request_context_getter_->GetNetLog(), | 162 url_request_context_getter_->GetNetLog(), |
162 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), | 163 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), |
163 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 164 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
164 false /* enable_quic */)); | 165 false /* enable_quic */, |
| 166 GetUserAgent())); |
165 data_reduction_proxy_settings_.reset( | 167 data_reduction_proxy_settings_.reset( |
166 new data_reduction_proxy::DataReductionProxySettings()); | 168 new data_reduction_proxy::DataReductionProxySettings()); |
167 data_reduction_proxy_service_.reset( | 169 data_reduction_proxy_service_.reset( |
168 new data_reduction_proxy::DataReductionProxyService( | 170 new data_reduction_proxy::DataReductionProxyService( |
169 scoped_ptr< | 171 scoped_ptr< |
170 data_reduction_proxy::DataReductionProxyCompressionStats>(), | 172 data_reduction_proxy::DataReductionProxyCompressionStats>(), |
171 data_reduction_proxy_settings_.get(), GetAwURLRequestContext(), | 173 data_reduction_proxy_settings_.get(), GetAwURLRequestContext(), |
172 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); | 174 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO))); |
173 data_reduction_proxy_io_data_->SetDataReductionProxyService( | 175 data_reduction_proxy_io_data_->SetDataReductionProxyService( |
174 data_reduction_proxy_service_->GetWeakPtr()); | 176 data_reduction_proxy_service_->GetWeakPtr()); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 return; | 381 return; |
380 // We don't care about commit_delay for now. It is just a dummy value. | 382 // We don't care about commit_delay for now. It is just a dummy value. |
381 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); | 383 base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60); |
382 data_reduction_proxy_service->EnableCompressionStatisticsLogging( | 384 data_reduction_proxy_service->EnableCompressionStatisticsLogging( |
383 user_pref_service_.get(), | 385 user_pref_service_.get(), |
384 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), | 386 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), |
385 commit_delay); | 387 commit_delay); |
386 } | 388 } |
387 | 389 |
388 } // namespace android_webview | 390 } // namespace android_webview |
OLD | NEW |