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

Side by Side Diff: net/http/http_network_layer.h

Issue 182993003: Add the ability for DevTools to wrap network transactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/http/http_network_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // HttpTransactionFactory methods: 45 // HttpTransactionFactory methods:
46 virtual int CreateTransaction(RequestPriority priority, 46 virtual int CreateTransaction(RequestPriority priority,
47 scoped_ptr<HttpTransaction>* trans) OVERRIDE; 47 scoped_ptr<HttpTransaction>* trans) OVERRIDE;
48 virtual HttpCache* GetCache() OVERRIDE; 48 virtual HttpCache* GetCache() OVERRIDE;
49 virtual HttpNetworkSession* GetSession() OVERRIDE; 49 virtual HttpNetworkSession* GetSession() OVERRIDE;
50 50
51 // base::PowerObserver methods: 51 // base::PowerObserver methods:
52 virtual void OnSuspend() OVERRIDE; 52 virtual void OnSuspend() OVERRIDE;
53 virtual void OnResume() OVERRIDE; 53 virtual void OnResume() OVERRIDE;
54 54
55 class TransactionFactory {
szym 2014/02/27 16:12:37 This is confusing. HttpNetworkLayer is a HttpTrans
56 public:
57 virtual ~TransactionFactory() {}
58
59 // Creates a HttpTransaction object. On success, saves the new
60 // transaction to |*trans| and returns OK.
61 virtual int CreateTransaction(RequestPriority priority,
62 HttpNetworkSession* session,
63 scoped_ptr<HttpTransaction>* trans) = 0;
64 };
65
66 // Set a global transaction factory. Factory will be used to construct
67 // transactions instead of HttpNetworkTransaction.
68 static void SetTransactionFactory(TransactionFactory*);
69
55 private: 70 private:
56 const scoped_refptr<HttpNetworkSession> session_; 71 const scoped_refptr<HttpNetworkSession> session_;
57 bool suspended_; 72 bool suspended_;
58 73
59 DISALLOW_COPY_AND_ASSIGN(HttpNetworkLayer); 74 DISALLOW_COPY_AND_ASSIGN(HttpNetworkLayer);
60 }; 75 };
61 76
62 } // namespace net 77 } // namespace net
63 78
64 #endif // NET_HTTP_HTTP_NETWORK_LAYER_H_ 79 #endif // NET_HTTP_HTTP_NETWORK_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_network_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698