| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef NET_HTTP_HTTP_NETWORK_LAYER_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_LAYER_H_ | 
| 6 #define NET_HTTP_HTTP_NETWORK_LAYER_H_ | 6 #define NET_HTTP_HTTP_NETWORK_LAYER_H_ | 
| 7 | 7 | 
| 8 #include <string> | 8 #include <string> | 
| 9 | 9 | 
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 29   virtual ~HttpNetworkLayer(); | 29   virtual ~HttpNetworkLayer(); | 
| 30 | 30 | 
| 31   // Create a transaction factory that instantiate a network layer over an | 31   // Create a transaction factory that instantiate a network layer over an | 
| 32   // existing network session. Network session contains some valuable | 32   // existing network session. Network session contains some valuable | 
| 33   // information (e.g. authentication data) that we want to share across | 33   // information (e.g. authentication data) that we want to share across | 
| 34   // multiple network layers. This method exposes the implementation details | 34   // multiple network layers. This method exposes the implementation details | 
| 35   // of a network layer, use this method with an existing network layer only | 35   // of a network layer, use this method with an existing network layer only | 
| 36   // when network session is shared. | 36   // when network session is shared. | 
| 37   static HttpTransactionFactory* CreateFactory(HttpNetworkSession* session); | 37   static HttpTransactionFactory* CreateFactory(HttpNetworkSession* session); | 
| 38 | 38 | 
| 39   // Forces an alternate protocol of SPDY/2 on port 443. | 39   // Forces an alternate protocol of SPDY/3 on port 443. | 
| 40   // TODO(rch): eliminate this method. | 40   // TODO(rch): eliminate this method. | 
| 41   static void ForceAlternateProtocol(); | 41   static void ForceAlternateProtocol(); | 
| 42 | 42 | 
| 43   // HttpTransactionFactory methods: | 43   // HttpTransactionFactory methods: | 
| 44   virtual int CreateTransaction(RequestPriority priority, | 44   virtual int CreateTransaction(RequestPriority priority, | 
| 45                                 scoped_ptr<HttpTransaction>* trans, | 45                                 scoped_ptr<HttpTransaction>* trans, | 
| 46                                 HttpTransactionDelegate* delegate) OVERRIDE; | 46                                 HttpTransactionDelegate* delegate) OVERRIDE; | 
| 47   virtual HttpCache* GetCache() OVERRIDE; | 47   virtual HttpCache* GetCache() OVERRIDE; | 
| 48   virtual HttpNetworkSession* GetSession() OVERRIDE; | 48   virtual HttpNetworkSession* GetSession() OVERRIDE; | 
| 49 | 49 | 
| 50   // base::PowerObserver methods: | 50   // base::PowerObserver methods: | 
| 51   virtual void OnSuspend() OVERRIDE; | 51   virtual void OnSuspend() OVERRIDE; | 
| 52   virtual void OnResume() OVERRIDE; | 52   virtual void OnResume() OVERRIDE; | 
| 53 | 53 | 
| 54  private: | 54  private: | 
| 55   const scoped_refptr<HttpNetworkSession> session_; | 55   const scoped_refptr<HttpNetworkSession> session_; | 
| 56   bool suspended_; | 56   bool suspended_; | 
| 57 }; | 57 }; | 
| 58 | 58 | 
| 59 }  // namespace net | 59 }  // namespace net | 
| 60 | 60 | 
| 61 #endif  // NET_HTTP_HTTP_NETWORK_LAYER_H_ | 61 #endif  // NET_HTTP_HTTP_NETWORK_LAYER_H_ | 
| OLD | NEW | 
|---|