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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_service.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_service.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
index 1760c10be9d8b32f5a65fb2429f209501b14a82a..bf44a458b90e79b4e3948663e7f8f9b1269ea819 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
@@ -10,6 +10,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h"
#include "net/url_request/url_fetcher_delegate.h"
class GURL;
@@ -66,6 +67,16 @@ class DataReductionProxyService : public base::NonThreadSafe,
scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
const base::TimeDelta& commit_delay);
+ // Records daily data savings statistics in |compression_stats_|.
+ void UpdateContentLengths(int received_content_length,
+ int original_content_length,
+ bool data_reduction_proxy_enabled,
+ DataReductionProxyRequestType request_type);
+
+ // Records whether the Data Reduction Proxy is unreachable or not.
+ void SetUnreachable(bool unreachable);
+
+ // Accessor methods.
DataReductionProxyCompressionStats* compression_stats() const {
return compression_stats_.get();
}

Powered by Google App Engine
This is Rietveld 408576698