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

Unified Diff: net/http/http_stream_factory_impl.h

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_stream_factory.cc ('k') | net/http/http_stream_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl.h
diff --git a/net/http/http_stream_factory_impl.h b/net/http/http_stream_factory_impl.h
deleted file mode 100644
index 8ee03a6dc2aef74ded7e5a38070cf83f6c01a876..0000000000000000000000000000000000000000
--- a/net/http/http_stream_factory_impl.h
+++ /dev/null
@@ -1,138 +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.
-
-#ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
-#define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
-
-#include <map>
-#include <set>
-#include <vector>
-
-#include "base/gtest_prod_util.h"
-#include "base/memory/ref_counted.h"
-#include "net/base/host_port_pair.h"
-#include "net/base/net_log.h"
-#include "net/http/http_stream_factory.h"
-#include "net/proxy/proxy_server.h"
-#include "net/socket/ssl_client_socket.h"
-#include "net/spdy/spdy_session_key.h"
-
-namespace net {
-
-class HttpNetworkSession;
-class SpdySession;
-
-class NET_EXPORT_PRIVATE HttpStreamFactoryImpl : public HttpStreamFactory {
- public:
- // RequestStream may only be called if |for_websockets| is false.
- // RequestWebSocketHandshakeStream may only be called if |for_websockets|
- // is true.
- HttpStreamFactoryImpl(HttpNetworkSession* session, bool for_websockets);
- ~HttpStreamFactoryImpl() override;
-
- // HttpStreamFactory interface
- HttpStreamRequest* RequestStream(const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config,
- HttpStreamRequest::Delegate* delegate,
- const BoundNetLog& net_log) override;
-
- HttpStreamRequest* RequestWebSocketHandshakeStream(
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config,
- HttpStreamRequest::Delegate* delegate,
- WebSocketHandshakeStreamBase::CreateHelper* create_helper,
- const BoundNetLog& net_log) override;
-
- void PreconnectStreams(int num_streams,
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config) override;
- const HostMappingRules* GetHostMappingRules() const override;
-
- size_t num_orphaned_jobs() const { return orphaned_job_set_.size(); }
-
- private:
- FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryImplRequestTest, SetPriority);
-
- class NET_EXPORT_PRIVATE Request;
- class NET_EXPORT_PRIVATE Job;
-
- typedef std::set<Request*> RequestSet;
- typedef std::map<SpdySessionKey, RequestSet> SpdySessionRequestMap;
-
- HttpStreamRequest* RequestStreamInternal(
- const HttpRequestInfo& info,
- RequestPriority priority,
- const SSLConfig& server_ssl_config,
- const SSLConfig& proxy_ssl_config,
- HttpStreamRequest::Delegate* delegate,
- WebSocketHandshakeStreamBase::CreateHelper* create_helper,
- const BoundNetLog& net_log);
-
- AlternateProtocolInfo GetAlternateProtocolRequestFor(
- const GURL& original_url,
- GURL* alternate_url);
-
- // Detaches |job| from |request|.
- void OrphanJob(Job* job, const Request* request);
-
- // Called when a SpdySession is ready. It will find appropriate Requests and
- // fulfill them. |direct| indicates whether or not |spdy_session| uses a
- // proxy.
- void OnNewSpdySessionReady(const base::WeakPtr<SpdySession>& spdy_session,
- bool direct,
- const SSLConfig& used_ssl_config,
- const ProxyInfo& used_proxy_info,
- bool was_npn_negotiated,
- NextProto protocol_negotiated,
- bool using_spdy,
- const BoundNetLog& net_log);
-
- // Called when the Job detects that the endpoint indicated by the
- // Alternate-Protocol does not work. Lets the factory update
- // HttpAlternateProtocols with the failure and resets the SPDY session key.
- void OnBrokenAlternateProtocol(const Job*, const HostPortPair& origin);
-
- // Invoked when an orphaned Job finishes.
- void OnOrphanedJobComplete(const Job* job);
-
- // Invoked when the Job finishes preconnecting sockets.
- void OnPreconnectsComplete(const Job* job);
-
- // Called when the Preconnect completes. Used for testing.
- virtual void OnPreconnectsCompleteInternal() {}
-
- HttpNetworkSession* const session_;
-
- // All Requests are handed out to clients. By the time HttpStreamFactoryImpl
- // is destroyed, all Requests should be deleted (which should remove them from
- // |request_map_|. The Requests will delete the corresponding job.
- std::map<const Job*, Request*> request_map_;
-
- SpdySessionRequestMap spdy_session_request_map_;
-
- // These jobs correspond to jobs orphaned by Requests and now owned by
- // HttpStreamFactoryImpl. Since they are no longer tied to Requests, they will
- // not be canceled when Requests are canceled. Therefore, in
- // ~HttpStreamFactoryImpl, it is possible for some jobs to still exist in this
- // set. Leftover jobs will be deleted when the factory is destroyed.
- std::set<const Job*> orphaned_job_set_;
-
- // These jobs correspond to preconnect requests and have no associated Request
- // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be
- // deleted when the factory is destroyed.
- std::set<const Job*> preconnect_job_set_;
-
- const bool for_websockets_;
- DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl);
-};
-
-} // namespace net
-
-#endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
« no previous file with comments | « net/http/http_stream_factory.cc ('k') | net/http/http_stream_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698