summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net
diff options
context:
space:
mode:
authortbansal <tbansal@chromium.org>2015-02-05 10:18:51 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-05 18:19:47 +0000
commit0aaf80ac3e3b5b93aea28e6a3acdf108dc1baa03 (patch)
tree0ccc4ecc7a3b3c29553e1f25ca936843d2a36e5b /chrome/browser/net
parente04cb0a6d89e5757d05e663a264e4059c0197e83 (diff)
downloadchromium_src-0aaf80ac3e3b5b93aea28e6a3acdf108dc1baa03.zip
chromium_src-0aaf80ac3e3b5b93aea28e6a3acdf108dc1baa03.tar.gz
chromium_src-0aaf80ac3e3b5b93aea28e6a3acdf108dc1baa03.tar.bz2
Store Proxy Servers as proxy servers and not GURLs.
Chrome Data Reduction Proxy stores proxy URLs as proxy server objects instead of GURLs. This enables us to support QUIC based proxies. BUG=454576 Review URL: https://codereview.chromium.org/863203009 Cr-Commit-Position: refs/heads/master@{#314835}
Diffstat (limited to 'chrome/browser/net')
-rw-r--r--chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc3
-rw-r--r--chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc11
2 files changed, 8 insertions, 6 deletions
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc
index 85dc0b1..ce94aae 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_android.cc
@@ -15,6 +15,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "jni/DataReductionProxySettings_jni.h"
+#include "net/proxy/proxy_server.h"
using base::android::ConvertUTF8ToJavaString;
@@ -46,7 +47,7 @@ jboolean DataReductionProxySettingsAndroid::IsIncludedInAltFieldTrial(
ScopedJavaLocalRef<jstring>
DataReductionProxySettingsAndroid::GetDataReductionProxyOrigin(
JNIEnv* env, jobject obj) {
- return ConvertUTF8ToJavaString(env, Settings()->params()->origin().spec());
+ return ConvertUTF8ToJavaString(env, Settings()->params()->origin().ToURI());
}
jboolean DataReductionProxySettingsAndroid::IsDataReductionProxyEnabled(
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
index 4248c27..1660c61 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
@@ -15,6 +15,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings_test_utils.h"
+#include "net/proxy/proxy_server.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -23,7 +24,7 @@ using testing::_;
using testing::AnyNumber;
using testing::Return;
-const char kDataReductionProxyDev[] = "http://foo-dev.com:80";
+const char kDataReductionProxyDev[] = "foo-dev.com:80";
using data_reduction_proxy::DataReductionProxySettings;
@@ -154,8 +155,8 @@ TEST_F(DataReductionProxySettingsAndroidTest, TestGetDataReductionProxyOrigin) {
SettingsAndroid()->GetDataReductionProxyOrigin(env_, NULL);
ASSERT_TRUE(result.obj());
const base::android::JavaRef<jstring>& str_ref = result;
- EXPECT_EQ(GURL(expected_params_->DefaultOrigin()),
- GURL(ConvertJavaStringToUTF8(str_ref)));
+ EXPECT_EQ(expected_params_->DefaultOrigin(),
+ ConvertJavaStringToUTF8(str_ref));
}
TEST_F(DataReductionProxySettingsAndroidTest,
@@ -169,8 +170,8 @@ TEST_F(DataReductionProxySettingsAndroidTest,
SettingsAndroid()->GetDataReductionProxyOrigin(env_, NULL);
ASSERT_TRUE(result.obj());
const base::android::JavaRef<jstring>& str_ref = result;
- EXPECT_EQ(GURL(kDataReductionProxyDev),
- GURL(ConvertJavaStringToUTF8(str_ref)));
+ EXPECT_EQ(kDataReductionProxyDev,
+ ConvertJavaStringToUTF8(str_ref));
}
TEST_F(DataReductionProxySettingsAndroidTest, TestGetDailyContentLengths) {