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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h

Issue 1054363002: Update DataReductionProxyNetworkDelegate/BypassStats to post tasks safely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bengr CR comments Created 5 years, 8 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
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
index 80eab78bec3c97eca49f642d1410be31aa6c9243..e258ec4f83f322e617eb16d256adeb1aa4076dcb 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h
@@ -10,6 +10,7 @@
#include "base/prefs/pref_member.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_debug_ui_service.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_delegate.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h"
@@ -20,12 +21,12 @@ class URLRequestInterceptor;
namespace data_reduction_proxy {
+class DataReductionProxyBypassStats;
class DataReductionProxyConfig;
class DataReductionProxyConfigServiceClient;
class DataReductionProxyConfigurator;
class DataReductionProxyEventStore;
class DataReductionProxyService;
-class DataReductionProxyBypassStats;
// Contains and initializes all Data Reduction Proxy objects that operate on
// the IO thread.
@@ -67,9 +68,16 @@ class DataReductionProxyIOData {
scoped_ptr<net::NetworkDelegate> wrapped_network_delegate,
bool track_proxy_bypass_statistics);
+ // Bridge methods to safely call to the UI thread objects.
+ void UpdateContentLengths(int received_content_length,
+ int original_content_length,
+ bool data_reduction_proxy_enabled,
+ DataReductionProxyRequestType request_type);
+
// Returns true if the Data Reduction Proxy is enabled and false otherwise.
bool IsEnabled() const;
+ // Various accessor methods.
DataReductionProxyConfigurator* configurator() const {
return configurator_.get();
}
@@ -172,4 +180,3 @@ class DataReductionProxyIOData {
} // namespace data_reduction_proxy
#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_BROWSER_DATA_REDUCTION_PROXY_IO_DATA_H_
-

Powered by Google App Engine
This is Rietveld 408576698