| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_STREAM_FACTORY_IMPL_JOB_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 ~Job(); | 43 ~Job(); |
| 44 | 44 |
| 45 // Start initiates the process of creating a new HttpStream. |request| will be | 45 // Start initiates the process of creating a new HttpStream. |request| will be |
| 46 // notified upon completion if the Job has not been Orphan()'d. | 46 // notified upon completion if the Job has not been Orphan()'d. |
| 47 void Start(Request* request); | 47 void Start(Request* request); |
| 48 | 48 |
| 49 // Preconnect will attempt to request |num_streams| sockets from the | 49 // Preconnect will attempt to request |num_streams| sockets from the |
| 50 // appropriate ClientSocketPool. | 50 // appropriate ClientSocketPool. |
| 51 int Preconnect(int num_streams); | 51 int Preconnect(int num_streams); |
| 52 | 52 |
| 53 int RestartTunnelWithProxyAuth(const string16& username, | 53 int RestartTunnelWithProxyAuth(const AuthCredentials& credentials); |
| 54 const string16& password); | |
| 55 LoadState GetLoadState() const; | 54 LoadState GetLoadState() const; |
| 56 | 55 |
| 57 // Marks this Job as the "alternate" job, from Alternate-Protocol. Tracks the | 56 // Marks this Job as the "alternate" job, from Alternate-Protocol. Tracks the |
| 58 // original url so we can mark the Alternate-Protocol as broken if | 57 // original url so we can mark the Alternate-Protocol as broken if |
| 59 // we fail to connect. | 58 // we fail to connect. |
| 60 void MarkAsAlternate(const GURL& original_url); | 59 void MarkAsAlternate(const GURL& original_url); |
| 61 | 60 |
| 62 // Tells |this| to wait for |job| to resume it. | 61 // Tells |this| to wait for |job| to resume it. |
| 63 void WaitFor(Job* job); | 62 void WaitFor(Job* job); |
| 64 | 63 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 bool existing_available_pipeline_; | 280 bool existing_available_pipeline_; |
| 282 | 281 |
| 283 base::WeakPtrFactory<Job> ptr_factory_; | 282 base::WeakPtrFactory<Job> ptr_factory_; |
| 284 | 283 |
| 285 DISALLOW_COPY_AND_ASSIGN(Job); | 284 DISALLOW_COPY_AND_ASSIGN(Job); |
| 286 }; | 285 }; |
| 287 | 286 |
| 288 } // namespace net | 287 } // namespace net |
| 289 | 288 |
| 290 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ | 289 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ |
| OLD | NEW |