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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.h

Issue 111113006: Metrics fix for data reduction proxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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: chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.h
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.h b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.h
index 636f3fd09819b27260d6714efd2a1a7b0641c2ba..8f25cdb796d574f99878b8c6f5bd979066f0e946 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.h
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.h
@@ -7,6 +7,7 @@
#include "base/metrics/field_trial.h"
+#include "base/metrics/histogram_samples.h"
#include "base/prefs/testing_pref_service.h"
#include "chrome/browser/net/spdyproxy/data_reduction_proxy_settings.h"
#include "net/url_request/test_url_fetcher_factory.h"
@@ -16,6 +17,9 @@
class PrefService;
class TestingPrefServiceSimple;
+using spdyproxy::ProbeURLFetchResult;
+using spdyproxy::ProxyStartupState;
+
template <class C>
class MockDataReductionProxySettings : public C {
public:
@@ -24,6 +28,10 @@ class MockDataReductionProxySettings : public C {
MOCK_METHOD0(GetLocalStatePrefs, PrefService*());
MOCK_METHOD3(LogProxyState, void(
bool enabled, bool restricted, bool at_startup));
+ MOCK_METHOD1(RecordProbeURLFetchResult,
+ void(ProbeURLFetchResult result));
+ MOCK_METHOD1(RecordStartupState,
+ void(ProxyStartupState state));
// SetProxyConfigs should always call LogProxyState exactly once.
virtual void SetProxyConfigs(
@@ -48,10 +56,12 @@ class DataReductionProxySettingsTestBase : public testing::Test {
template <class C> void SetProbeResult(
const std::string& test_url,
const std::string& response,
+ ProbeURLFetchResult state,
bool success,
int expected_calls);
virtual void SetProbeResult(const std::string& test_url,
const std::string& response,
+ ProbeURLFetchResult result,
bool success,
int expected_calls) = 0;
@@ -92,10 +102,11 @@ class ConcreteDataReductionProxySettingsTest
virtual void SetProbeResult(const std::string& test_url,
const std::string& response,
+ ProbeURLFetchResult result,
bool success,
int expected_calls) OVERRIDE {
return DataReductionProxySettingsTestBase::SetProbeResult<C>(
- test_url, response, success, expected_calls);
+ test_url, response, result, success, expected_calls);
}
};

Powered by Google App Engine
This is Rietveld 408576698