diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 23:52:07 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-21 23:52:07 +0000 |
commit | 650e2cae692b1ec5d4f079043b466c59abef4f4b (patch) | |
tree | 77f4fd57ef1fabb4b25445e7c27297749f27f425 /net/http/http_network_layer.cc | |
parent | 53f912877e60a6adbf93f399f7ce56cbbc366120 (diff) | |
download | chromium_src-650e2cae692b1ec5d4f079043b466c59abef4f4b.zip chromium_src-650e2cae692b1ec5d4f079043b466c59abef4f4b.tar.gz chromium_src-650e2cae692b1ec5d4f079043b466c59abef4f4b.tar.bz2 |
Expand the options for how FLIP runs. The GFE team needs
the ability to run a client with ssl & compression turned off.
Update the command line to accomodate.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/315006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_layer.cc')
-rw-r--r-- | net/http/http_network_layer.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc index b8ac600..1857e52 100644 --- a/net/http/http_network_layer.cc +++ b/net/http/http_network_layer.cc @@ -5,7 +5,9 @@ #include "net/http/http_network_layer.h" #include "base/logging.h" +#include "net/flip/flip_framer.h" #include "net/flip/flip_network_transaction.h" +#include "net/flip/flip_session.h" #include "net/http/http_network_session.h" #include "net/http/http_network_transaction.h" #include "net/socket/client_socket_factory.h" @@ -97,8 +99,21 @@ HttpNetworkSession* HttpNetworkLayer::GetSession() { } // static -void HttpNetworkLayer::EnableFlip(bool enable) { - enable_flip_ = enable; +void HttpNetworkLayer::EnableFlip(const std::string& mode) { + static const std::string kDisableSSL("no-ssl"); + static const std::string kDisableCompression("no-compress"); + static const std::string kDisableEverything("no-ssl-no-compress"); + + // Enable flip mode. + enable_flip_ = true; + + // Disable SSL + if (mode == kDisableEverything || mode == kDisableSSL) + FlipSession::SetSSLMode(false); + + // Disable compression + if (mode == kDisableEverything || mode == kDisableCompression) + flip::FlipFramer::set_enable_compression_default(false); } } // namespace net |