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

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

Issue 1054413002: Remove the "alternate_url" outparam from (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename GetAlternativeServiceRequestFor Created 5 years, 8 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
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_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // notified upon completion if the Job has not been Orphan()'d. 48 // notified upon completion if the Job has not been Orphan()'d.
49 void Start(Request* request); 49 void Start(Request* request);
50 50
51 // Preconnect will attempt to request |num_streams| sockets from the 51 // Preconnect will attempt to request |num_streams| sockets from the
52 // appropriate ClientSocketPool. 52 // appropriate ClientSocketPool.
53 int Preconnect(int num_streams); 53 int Preconnect(int num_streams);
54 54
55 int RestartTunnelWithProxyAuth(const AuthCredentials& credentials); 55 int RestartTunnelWithProxyAuth(const AuthCredentials& credentials);
56 LoadState GetLoadState() const; 56 LoadState GetLoadState() const;
57 57
58 // Marks this Job as the "alternate" job, from Alternate-Protocol. Tracks the 58 // Marks this Job as the "alternate" job, from Alternate-Protocol or Alt-Svc
59 // original url so we can mark the Alternate-Protocol as broken if 59 // using the specified alternate service.
60 // we fail to connect. |alternate| specifies the alternate protocol to use 60 void MarkAsAlternate(AlternativeService alternative_service);
61 // and alternate port to connect to.
62 void MarkAsAlternate(const GURL& original_url,
63 AlternativeService alternative_service);
64 61
65 // Tells |this| to wait for |job| to resume it. 62 // Tells |this| to wait for |job| to resume it.
66 void WaitFor(Job* job); 63 void WaitFor(Job* job);
67 64
68 // Tells |this| that |job| has determined it still needs to continue 65 // Tells |this| that |job| has determined it still needs to continue
69 // connecting, so allow |this| to continue. If this is not called, then 66 // connecting, so allow |this| to continue. If this is not called, then
70 // |request_| is expected to cancel |this| by deleting it. 67 // |request_| is expected to cancel |this| by deleting it.
71 void Resume(Job* job); 68 void Resume(Job* job);
72 69
73 // Used to detach the Job from |request|. 70 // Used to detach the Job from |request|.
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 SSLInfo ssl_info_; 263 SSLInfo ssl_info_;
267 264
268 // The server we are trying to reach, could be that of the origin or of the 265 // The server we are trying to reach, could be that of the origin or of the
269 // alternative service. 266 // alternative service.
270 HostPortPair server_; 267 HostPortPair server_;
271 268
272 // The origin url we're trying to reach. This url may be different from the 269 // The origin url we're trying to reach. This url may be different from the
273 // original request when host mapping rules are set-up. 270 // original request when host mapping rules are set-up.
274 GURL origin_url_; 271 GURL origin_url_;
275 272
276 // The original URL if the Job is for an alternative service.
277 GURL original_url_;
278
279 // AlternateProtocol for this job if this is an alternate job. 273 // AlternateProtocol for this job if this is an alternate job.
280 AlternativeService alternative_service_; 274 AlternativeService alternative_service_;
281 275
276 // The URL to be used for proxy resolution and socket pools. If the alternate
277 // service is SPDY, the URL will containg the host:port from
278 // |alternate_service_| and "https://" scheme.
Bence 2015/04/03 19:35:52 Please clarify that for a non-alternate Job, this
Ryan Hamilton 2015/04/03 20:33:21 Done.
279 GURL alternative_service_url_;
280
282 // AlternateProtocol for the other job if this is not an alternate job. 281 // AlternateProtocol for the other job if this is not an alternate job.
283 AlternativeService other_job_alternative_service_; 282 AlternativeService other_job_alternative_service_;
284 283
285 // This is the Job we're dependent on. It will notify us if/when it's OK to 284 // This is the Job we're dependent on. It will notify us if/when it's OK to
286 // proceed. 285 // proceed.
287 Job* blocking_job_; 286 Job* blocking_job_;
288 287
289 // |waiting_job_| is a Job waiting to see if |this| can reuse a connection. 288 // |waiting_job_| is a Job waiting to see if |this| can reuse a connection.
290 // If |this| is unable to do so, we'll notify |waiting_job_| that it's ok to 289 // If |this| is unable to do so, we'll notify |waiting_job_| that it's ok to
291 // proceed and then race the two Jobs. 290 // proceed and then race the two Jobs.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 JobStatus other_job_status_; 342 JobStatus other_job_status_;
344 343
345 base::WeakPtrFactory<Job> ptr_factory_; 344 base::WeakPtrFactory<Job> ptr_factory_;
346 345
347 DISALLOW_COPY_AND_ASSIGN(Job); 346 DISALLOW_COPY_AND_ASSIGN(Job);
348 }; 347 };
349 348
350 } // namespace net 349 } // namespace net
351 350
352 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_ 351 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698