summaryrefslogtreecommitdiffstats
path: root/android_webview
diff options
context:
space:
mode:
authorjeremyim <jeremyim@chromium.org>2015-04-10 15:02:57 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-10 22:03:16 +0000
commit661d037fdb251e69a1b97040e3965d61ccc799ec (patch)
tree0d7b2b8c5c3a4e4538f492ba12d557b943cc6d34 /android_webview
parent2d51d5f255ee038c0770fc101660728a3e44339a (diff)
downloadchromium_src-661d037fdb251e69a1b97040e3965d61ccc799ec.zip
chromium_src-661d037fdb251e69a1b97040e3965d61ccc799ec.tar.gz
chromium_src-661d037fdb251e69a1b97040e3965d61ccc799ec.tar.bz2
Update DataReductionProxySettings->DataReductionProxyConfig interaction for task runner safety.
- Config is no longer exposed to Settings for purposes of posting the "Update Config" task when the UI setting is enabled; instead the call is proxied through DRPService to post to DRPIOData on a weak pointer - Initialization logic updated to ensure DRPService has a weak pointer to DRPIOData (initialized on the IO thread), which takes place after DRPIOData receives a weak pointer to DRPService (initialized on the UI thread). - Add DRPService observer so that DRPSettings is notified when DRPService receives the DRPIOData weak pointer (so that calls to DRP IO classes will not be silently dropped due to the weak pointer not being set). BUG=472290 Review URL: https://codereview.chromium.org/1075743002 Cr-Commit-Position: refs/heads/master@{#324693}
Diffstat (limited to 'android_webview')
-rw-r--r--android_webview/browser/aw_browser_context.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index caa221f..e108895 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -168,7 +168,8 @@ void AwBrowserContext::PreMainMessageLoopRun() {
new data_reduction_proxy::DataReductionProxyService(
scoped_ptr<
data_reduction_proxy::DataReductionProxyCompressionStats>(),
- data_reduction_proxy_settings_.get(), GetAwURLRequestContext()));
+ data_reduction_proxy_settings_.get(), GetAwURLRequestContext(),
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
data_reduction_proxy_io_data_->SetDataReductionProxyService(
data_reduction_proxy_service_->GetWeakPtr());