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

Unified Diff: chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc

Issue 275953002: Remove HTTP pipelining support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix line endings Created 6 years, 7 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
« no previous file with comments | « chrome/browser/ui/webui/net_internals/net_internals_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
index 3d60cc0150193eb47d57c5566e1926c82fe9c87c..a7c84aff5d34ee4c1c450ab82549d32905ccaae3 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc
@@ -34,7 +34,6 @@
#include "net/dns/host_resolver.h"
#include "net/dns/mock_host_resolver.h"
#include "net/http/http_network_session.h"
-#include "net/http/http_pipelined_host_capability.h"
#include "net/http/http_transaction_factory.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
@@ -78,34 +77,6 @@ void AddCacheEntryOnIOThread(net::URLRequestContextGetter* context_getter,
ttl);
}
-// Called on IO thread. Adds an entry to the list of known HTTP pipelining
-// hosts.
-void AddDummyHttpPipelineFeedbackOnIOThread(
- net::URLRequestContextGetter* context_getter,
- const std::string& hostname,
- int port,
- net::HttpPipelinedHostCapability capability) {
- ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO));
- net::URLRequestContext* context = context_getter->GetURLRequestContext();
- net::HttpNetworkSession* http_network_session =
- context->http_transaction_factory()->GetSession();
- base::WeakPtr<net::HttpServerProperties> http_server_properties =
- http_network_session->http_server_properties();
- net::HostPortPair origin(hostname, port);
- http_server_properties->SetPipelineCapability(origin, capability);
-}
-
-// Called on IO thread. Adds an entry to the list of known HTTP pipelining
-// hosts.
-void EnableHttpPipeliningOnIOThread(
- net::URLRequestContextGetter* context_getter, bool enable) {
- ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO));
- net::URLRequestContext* context = context_getter->GetURLRequestContext();
- net::HttpNetworkSession* http_network_session =
- context->http_transaction_factory()->GetSession();
- http_network_session->set_http_pipelining_enabled(enable);
-}
-
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -152,13 +123,6 @@ class NetInternalsTest::MessageHandler : public content::WebUIMessageHandler {
// Closes an incognito browser created with CreateIncognitoBrowser.
void CloseIncognitoBrowser(const base::ListValue* list_value);
- // Takes in a boolean and enables/disabled HTTP pipelining accordingly.
- void EnableHttpPipelining(const base::ListValue* list_value);
-
- // Called on UI thread. Adds an entry to the list of known HTTP pipelining
- // hosts.
- void AddDummyHttpPipelineFeedback(const base::ListValue* list_value);
-
// Creates a simple log with a NetLogLogger, and returns it to the
// Javascript callback.
void GetNetLogLoggerLog(const base::ListValue* list_value);
@@ -199,13 +163,6 @@ void NetInternalsTest::MessageHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback("closeIncognitoBrowser",
base::Bind(&NetInternalsTest::MessageHandler::CloseIncognitoBrowser,
base::Unretained(this)));
- web_ui()->RegisterMessageCallback("enableHttpPipelining",
- base::Bind(&NetInternalsTest::MessageHandler::EnableHttpPipelining,
- base::Unretained(this)));
- web_ui()->RegisterMessageCallback("addDummyHttpPipelineFeedback",
- base::Bind(
- &NetInternalsTest::MessageHandler::AddDummyHttpPipelineFeedback,
- base::Unretained(this)));
web_ui()->RegisterMessageCallback("getNetLogLoggerLog",
base::Bind(
&NetInternalsTest::MessageHandler::GetNetLogLoggerLog,
@@ -303,42 +260,6 @@ void NetInternalsTest::MessageHandler::CloseIncognitoBrowser(
incognito_browser_ = NULL;
}
-void NetInternalsTest::MessageHandler::EnableHttpPipelining(
- const base::ListValue* list_value) {
- bool enable;
- ASSERT_TRUE(list_value->GetBoolean(0, &enable));
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(&EnableHttpPipeliningOnIOThread,
- make_scoped_refptr(browser()->profile()->GetRequestContext()),
- enable));
-}
-
-void NetInternalsTest::MessageHandler::AddDummyHttpPipelineFeedback(
- const base::ListValue* list_value) {
- std::string hostname;
- double port;
- std::string raw_capability;
- net::HttpPipelinedHostCapability capability;
- ASSERT_TRUE(list_value->GetString(0, &hostname));
- ASSERT_TRUE(list_value->GetDouble(1, &port));
- ASSERT_TRUE(list_value->GetString(2, &raw_capability));
- if (raw_capability == "capable") {
- capability = net::PIPELINE_CAPABLE;
- } else if (raw_capability == "incapable") {
- capability = net::PIPELINE_INCAPABLE;
- } else {
- FAIL() << "Unexpected capability string: " << raw_capability;
- }
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(&AddDummyHttpPipelineFeedbackOnIOThread,
- make_scoped_refptr(browser()->profile()->GetRequestContext()),
- hostname,
- static_cast<int>(port),
- capability));
-}
-
void NetInternalsTest::MessageHandler::GetNetLogLoggerLog(
const base::ListValue* list_value) {
base::ScopedTempDir temp_directory;
« no previous file with comments | « chrome/browser/ui/webui/net_internals/net_internals_ui.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698