Commit f37e941d authored by bengr@chromium.org's avatar bengr@chromium.org

Remove round trip from data reduction proxy authentication

BUG=232932

Review URL: https://chromiumcodereview.appspot.com/14994003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202472 0039d316-1c4b-4281-b951-d872f2087c98
parent 237207bc
......@@ -408,6 +408,7 @@
'spdy_proxy_auth_origin%' : '',
'spdy_proxy_auth_property%' : '',
'spdy_proxy_auth_value%' : '',
'conditions': [
# A flag for POSIX platforms
......@@ -817,6 +818,7 @@
'enable_managed_users%': '<(enable_managed_users)',
'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
# Use system mesa instead of bundled one.
'use_system_mesa%': 0,
......@@ -2195,6 +2197,9 @@
['spdy_proxy_auth_property != ""', {
'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
}],
['spdy_proxy_auth_value != ""', {
'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
}],
['enable_mdns==1', {
'defines': ['ENABLE_MDNS=1'],
}]
......
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/app/android/chrome_data_reduction_proxy_android.h"
#include "net/http/http_network_session.h"
void ChromeDataReductionProxyAndroid::Init(net::HttpNetworkSession* session) {
}
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/app/android/chrome_data_reduction_proxy_android.h"
#include "net/http/http_network_session.h"
ChromeDataReductionProxyAndroid::ChromeDataReductionProxyAndroid() {
}
ChromeDataReductionProxyAndroid::~ChromeDataReductionProxyAndroid() {
}
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_APP_ANDROID_CHROME_DATA_REDUCTION_PROXY_ANDROID_H_
#define CHROME_APP_ANDROID_CHROME_DATA_REDUCTION_PROXY_ANDROID_H_
#include "net/http/http_network_session.h"
// Sets up state to interact with the data reduction proxy.
class ChromeDataReductionProxyAndroid {
public:
static void Init(net::HttpNetworkSession* session);
protected:
ChromeDataReductionProxyAndroid();
virtual ~ChromeDataReductionProxyAndroid();
DISALLOW_COPY_AND_ASSIGN(ChromeDataReductionProxyAndroid);
};
#endif // CHROME_APP_ANDROID_CHROME_DATA_REDUCTION_PROXY_ANDROID_H_
......@@ -44,6 +44,10 @@
#include "net/url_request/url_request_job_factory_impl.h"
#include "webkit/quota/special_storage_policy.h"
#if defined(OS_ANDROID)
#include "chrome/app/android/chrome_data_reduction_proxy_android.h"
#endif
namespace {
net::BackendType ChooseCacheBackendType() {
......@@ -417,6 +421,10 @@ void ProfileImplIOData::InitializeInternal(
network_session_params, main_backend);
main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path);
#if defined(OS_ANDROID)
ChromeDataReductionProxyAndroid::Init(main_cache->GetSession());
#endif
if (record_mode || playback_mode) {
main_cache->set_mode(
record_mode ? net::HttpCache::RECORD : net::HttpCache::PLAYBACK);
......
......@@ -16,6 +16,7 @@
'dependencies': [
'../base/base.gyp:base',
'chrome_android_core',
'chrome_android_auxiliary',
'chromium_testshell_jni_headers',
'chrome.gyp:browser_ui',
],
......@@ -23,7 +24,6 @@
# This file must always be included in the shared_library step to ensure
# JNI_OnLoad is exported.
'app/android/chrome_jni_onload.cc',
'android/testshell/chrome_main_delegate_testshell_android.cc',
'android/testshell/chrome_main_delegate_testshell_android.h',
"android/testshell/testshell_google_location_settings_helper.cc",
......@@ -112,6 +112,8 @@
'sources': [
'app/android/chrome_android_initializer.cc',
'app/android/chrome_android_initializer.h',
'app/android/chrome_data_reduction_proxy_android.cc',
'app/android/chrome_data_reduction_proxy_android.h',
'app/android/chrome_main_delegate_android.cc',
'app/android/chrome_main_delegate_android.h',
'app/chrome_main_delegate.cc',
......@@ -124,6 +126,19 @@
],
},
},
{
'target_name': 'chrome_android_auxiliary',
'type': 'static_library',
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)/chromium_testshell',
],
'sources': [
'android/testshell/chrome_data_reduction_proxy_testshell_android.cc',
],
'dependencies': [
'../base/base.gyp:base',
],
},
{
'target_name': 'chromium_testshell_paks',
'type': 'none',
......
......@@ -2368,6 +2368,7 @@
['gtest_target_type == "shared_library"', {
'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code',
'chrome.gyp:chrome_android_auxiliary',
],
}],
],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment