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

Unified Diff: net/http/http_network_layer.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/http/http_network_layer.h ('k') | net/http/http_network_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_layer.cc
diff --git a/net/http/http_network_layer.cc b/net/http/http_network_layer.cc
deleted file mode 100644
index 258555f535ad2deae82364ae7d42290b77634b14..0000000000000000000000000000000000000000
--- a/net/http/http_network_layer.cc
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright (c) 2012 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 "net/http/http_network_layer.h"
-
-#include "base/logging.h"
-#include "base/power_monitor/power_monitor.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_split.h"
-#include "base/strings/string_util.h"
-#include "net/http/http_network_session.h"
-#include "net/http/http_network_transaction.h"
-#include "net/http/http_server_properties_impl.h"
-#include "net/http/http_stream_factory_impl_job.h"
-#include "net/spdy/spdy_framer.h"
-#include "net/spdy/spdy_session.h"
-#include "net/spdy/spdy_session_pool.h"
-
-namespace net {
-
-//-----------------------------------------------------------------------------
-HttpNetworkLayer::HttpNetworkLayer(HttpNetworkSession* session)
- : session_(session),
- suspended_(false) {
- DCHECK(session_.get());
-#if defined(OS_WIN)
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get();
- if (power_monitor)
- power_monitor->AddObserver(this);
-#endif
-}
-
-HttpNetworkLayer::~HttpNetworkLayer() {
-#if defined(OS_WIN)
- base::PowerMonitor* power_monitor = base::PowerMonitor::Get();
- if (power_monitor)
- power_monitor->RemoveObserver(this);
-#endif
-}
-
-//-----------------------------------------------------------------------------
-
-// static
-HttpTransactionFactory* HttpNetworkLayer::CreateFactory(
- HttpNetworkSession* session) {
- DCHECK(session);
-
- return new HttpNetworkLayer(session);
-}
-
-// static
-void HttpNetworkLayer::ForceAlternateProtocol() {
- AlternateProtocolInfo pair(443, NPN_SPDY_3, 1);
- HttpServerPropertiesImpl::ForceAlternateProtocol(pair);
-}
-
-//-----------------------------------------------------------------------------
-
-int HttpNetworkLayer::CreateTransaction(RequestPriority priority,
- scoped_ptr<HttpTransaction>* trans) {
- if (suspended_)
- return ERR_NETWORK_IO_SUSPENDED;
-
- trans->reset(new HttpNetworkTransaction(priority, GetSession()));
- return OK;
-}
-
-HttpCache* HttpNetworkLayer::GetCache() {
- return NULL;
-}
-
-HttpNetworkSession* HttpNetworkLayer::GetSession() { return session_.get(); }
-
-void HttpNetworkLayer::OnSuspend() {
- suspended_ = true;
-
- if (session_.get())
- session_->CloseIdleConnections();
-}
-
-void HttpNetworkLayer::OnResume() {
- suspended_ = false;
-}
-
-} // namespace net
« no previous file with comments | « net/http/http_network_layer.h ('k') | net/http/http_network_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698