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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h

Issue 373153003: Bypass data reduction proxy when using VPN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/browser/data_reduction_proxy_settings_test_utils.h
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h
index 1fb3301c70660f340621e661ee67dd1bb1d8fb6f..e01d0cf330fad4dbec4880e3dcc54edbe2e9f153 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_settings_test_utils.h
@@ -6,10 +6,12 @@
#define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_SETTINGS_TEST_UTILS_H_
+#include "base/memory/scoped_ptr.h"
#include "base/prefs/testing_pref_service.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_configurator.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_params_test_utils.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_settings.h"
+#include "net/base/net_util.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -85,6 +87,15 @@ class MockDataReductionProxySettings : public C {
EXPECT_CALL(*this, LogProxyState(enabled, restricted, at_startup)).Times(1);
C::SetProxyConfigs(enabled, alternative_enabled, restricted, at_startup);
}
+ virtual void GetNetworkList(net::NetworkInterfaceList* interfaces,
+ int policy) OVERRIDE {
+ if (!network_interfaces_.get())
+ return;
+ for (size_t i = 0; i < network_interfaces_->size(); ++i)
+ interfaces->push_back(network_interfaces_->at(i));
+ }
+
+ scoped_ptr<net::NetworkInterfaceList> network_interfaces_;
};
class DataReductionProxySettingsTestBase : public testing::Test {

Powered by Google App Engine
This is Rietveld 408576698