OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ | 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ |
6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ | 6 #define CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 const std::string& client_id() const { | 68 const std::string& client_id() const { |
69 return client_id_; | 69 return client_id_; |
70 } | 70 } |
71 | 71 |
72 void FireThrottledCallback(); | 72 void FireThrottledCallback(); |
73 | 73 |
74 // HttpTransaction methods: | 74 // HttpTransaction methods: |
75 virtual int Start( | 75 virtual int Start( |
76 const net::HttpRequestInfo* request, | 76 const net::HttpRequestInfo* request, |
77 const net::CompletionCallback& callback, | 77 const net::CompletionCallback& callback, |
78 const net::BoundNetLog& net_log) OVERRIDE; | 78 const net::BoundNetLog& net_log) override; |
79 virtual int RestartIgnoringLastError( | 79 virtual int RestartIgnoringLastError( |
80 const net::CompletionCallback& callback) OVERRIDE; | 80 const net::CompletionCallback& callback) override; |
81 virtual int RestartWithCertificate( | 81 virtual int RestartWithCertificate( |
82 net::X509Certificate* client_cert, | 82 net::X509Certificate* client_cert, |
83 const net::CompletionCallback& callback) OVERRIDE; | 83 const net::CompletionCallback& callback) override; |
84 virtual int RestartWithAuth( | 84 virtual int RestartWithAuth( |
85 const net::AuthCredentials& credentials, | 85 const net::AuthCredentials& credentials, |
86 const net::CompletionCallback& callback) OVERRIDE; | 86 const net::CompletionCallback& callback) override; |
87 virtual bool IsReadyToRestartForAuth() OVERRIDE; | 87 virtual bool IsReadyToRestartForAuth() override; |
88 | 88 |
89 virtual int Read( | 89 virtual int Read( |
90 net::IOBuffer* buf, | 90 net::IOBuffer* buf, |
91 int buf_len, | 91 int buf_len, |
92 const net::CompletionCallback& callback) OVERRIDE; | 92 const net::CompletionCallback& callback) override; |
93 virtual void StopCaching() OVERRIDE; | 93 virtual void StopCaching() override; |
94 virtual bool GetFullRequestHeaders( | 94 virtual bool GetFullRequestHeaders( |
95 net::HttpRequestHeaders* headers) const OVERRIDE; | 95 net::HttpRequestHeaders* headers) const override; |
96 virtual int64 GetTotalReceivedBytes() const OVERRIDE; | 96 virtual int64 GetTotalReceivedBytes() const override; |
97 virtual void DoneReading() OVERRIDE; | 97 virtual void DoneReading() override; |
98 virtual const net::HttpResponseInfo* GetResponseInfo() const OVERRIDE; | 98 virtual const net::HttpResponseInfo* GetResponseInfo() const override; |
99 virtual net::LoadState GetLoadState() const OVERRIDE; | 99 virtual net::LoadState GetLoadState() const override; |
100 virtual net::UploadProgress GetUploadProgress() const OVERRIDE; | 100 virtual net::UploadProgress GetUploadProgress() const override; |
101 virtual void SetQuicServerInfo( | 101 virtual void SetQuicServerInfo( |
102 net::QuicServerInfo* quic_server_info) OVERRIDE; | 102 net::QuicServerInfo* quic_server_info) override; |
103 virtual bool GetLoadTimingInfo( | 103 virtual bool GetLoadTimingInfo( |
104 net::LoadTimingInfo* load_timing_info) const OVERRIDE; | 104 net::LoadTimingInfo* load_timing_info) const override; |
105 virtual void SetPriority(net::RequestPriority priority) OVERRIDE; | 105 virtual void SetPriority(net::RequestPriority priority) override; |
106 virtual void SetWebSocketHandshakeStreamCreateHelper( | 106 virtual void SetWebSocketHandshakeStreamCreateHelper( |
107 net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) OVERRIDE; | 107 net::WebSocketHandshakeStreamBase::CreateHelper* create_helper) override; |
108 virtual void SetBeforeNetworkStartCallback( | 108 virtual void SetBeforeNetworkStartCallback( |
109 const BeforeNetworkStartCallback& callback) OVERRIDE; | 109 const BeforeNetworkStartCallback& callback) override; |
110 virtual void SetBeforeProxyHeadersSentCallback( | 110 virtual void SetBeforeProxyHeadersSentCallback( |
111 const BeforeProxyHeadersSentCallback& callback) OVERRIDE; | 111 const BeforeProxyHeadersSentCallback& callback) override; |
112 virtual int ResumeNetworkStart() OVERRIDE; | 112 virtual int ResumeNetworkStart() override; |
113 | 113 |
114 protected: | 114 protected: |
115 friend class test::DevToolsNetworkControllerHelper; | 115 friend class test::DevToolsNetworkControllerHelper; |
116 | 116 |
117 private: | 117 private: |
118 // Proxy callback handler. Runs saved callback. | 118 // Proxy callback handler. Runs saved callback. |
119 void OnCallback(int result); | 119 void OnCallback(int result); |
120 | 120 |
121 DevToolsNetworkController* controller_; | 121 DevToolsNetworkController* controller_; |
122 base::WeakPtr<DevToolsNetworkInterceptor> interceptor_; | 122 base::WeakPtr<DevToolsNetworkInterceptor> interceptor_; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 int throttled_result_; | 160 int throttled_result_; |
161 int64_t throttled_byte_count_; | 161 int64_t throttled_byte_count_; |
162 CallbackType callback_type_; | 162 CallbackType callback_type_; |
163 net::CompletionCallback proxy_callback_; | 163 net::CompletionCallback proxy_callback_; |
164 net::CompletionCallback callback_; | 164 net::CompletionCallback callback_; |
165 | 165 |
166 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkTransaction); | 166 DISALLOW_COPY_AND_ASSIGN(DevToolsNetworkTransaction); |
167 }; | 167 }; |
168 | 168 |
169 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ | 169 #endif // CHROME_BROWSER_DEVTOOLS_DEVTOOLS_NETWORK_TRANSACTION_H_ |
OLD | NEW |