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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.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_settings.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
index ca19611a5b863a66c2294568c5eba35512ac9c84..4b87b3ca4e6c3d6b9f211c39171bd5fb4deaadc4 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h
@@ -15,6 +15,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_member.h"
#include "base/threading/thread_checker.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h"
#include "url/gurl.h"
class PrefService;
@@ -27,21 +28,11 @@ class DataReductionProxyIOData;
class DataReductionProxyService;
class DataReductionProxyCompressionStats;
-// The number of days of bandwidth usage statistics that are tracked.
-const unsigned int kNumDaysInHistory = 60;
-
// The header used to request a data reduction proxy pass through. When a
// request is sent to the data reduction proxy with this header, it will respond
// with the original uncompressed response.
extern const char kDataReductionPassThroughHeader[];
-// The number of days of bandwidth usage statistics that are presented.
-const unsigned int kNumDaysInHistorySummary = 30;
-
-static_assert(kNumDaysInHistorySummary <= kNumDaysInHistory,
- "kNumDaysInHistorySummary should be no larger than "
- "kNumDaysInHistory");
-
// Values of the UMA DataReductionProxy.StartupState histogram.
// This enum must remain synchronized with DataReductionProxyStartupState
// in metrics/histograms/histograms.xml.
@@ -59,7 +50,6 @@ enum ProxyStartupState {
// associated factory class, and refactor the Java call sites accordingly.
class DataReductionProxySettings {
public:
- typedef std::vector<long long> ContentLengthList;
typedef base::Callback<bool(const std::string&, const std::string&)>
SyntheticFieldTrialRegistrationCallback;
@@ -112,11 +102,6 @@ class DataReductionProxySettings {
// daily original and received content lengths.
int64 GetDataReductionLastUpdateTime();
- // Returns a vector containing the total size of all HTTP content that was
- // received over the last |kNumDaysInHistory| before any compression by the
- // data reduction proxy. Each element in the vector contains one day of data.
- ContentLengthList GetDailyOriginalContentLengths();
-
// Returns aggregate received and original content lengths over the specified
// number of days, as well as the time these stats were last updated.
void GetContentLengths(unsigned int days,
@@ -132,10 +117,6 @@ class DataReductionProxySettings {
// some of them should have.
bool IsDataReductionProxyUnreachable();
- // Returns an vector containing the aggregate received HTTP content in the
- // last |kNumDaysInHistory| days.
- ContentLengthList GetDailyReceivedContentLengths();
-
ContentLengthList GetDailyContentLengths(const char* pref_name);
// Configures data reduction proxy. |at_startup| is true when this method is

Powered by Google App Engine
This is Rietveld 408576698