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

Side by Side Diff: net/url_request/url_request_job_manager.h

Issue 740643003: Use URLRequestJobManager to retry data reduction proxy bypasses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: export manager Created 6 years, 1 month 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
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc ('k') | no next file » | 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_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/synchronization/lock.h" 11 #include "base/synchronization/lock.h"
12 #include "base/threading/platform_thread.h" 12 #include "base/threading/platform_thread.h"
13 #include "net/url_request/url_request.h" 13 #include "net/url_request/url_request.h"
14 14
15 template <typename T> struct DefaultSingletonTraits; 15 template <typename T> struct DefaultSingletonTraits;
16 16
17 namespace net { 17 namespace net {
18 18
19 // This class is responsible for managing the set of protocol factories and 19 // This class is responsible for managing the set of protocol factories and
20 // request interceptors that determine how an URLRequestJob gets created to 20 // request interceptors that determine how an URLRequestJob gets created to
21 // handle an URLRequest. 21 // handle an URLRequest.
22 // 22 //
23 // MULTI-THREADING NOTICE: 23 // MULTI-THREADING NOTICE:
24 // URLRequest is designed to have all consumers on a single thread, and 24 // URLRequest is designed to have all consumers on a single thread, and
25 // so no attempt is made to support Interceptor instances being 25 // so no attempt is made to support Interceptor instances being
26 // registered/unregistered or in any way poked on multiple threads. 26 // registered/unregistered or in any way poked on multiple threads.
27 class URLRequestJobManager { 27 class NET_EXPORT URLRequestJobManager {
mmenke 2014/11/20 16:46:09 include net/base/net_export.h (Or something like t
bengr 2014/11/20 17:30:38 Done.
28 public: 28 public:
29 // Returns the singleton instance. 29 // Returns the singleton instance.
30 static URLRequestJobManager* GetInstance(); 30 static URLRequestJobManager* GetInstance();
31 31
32 // Instantiate an URLRequestJob implementation based on the registered 32 // Instantiate an URLRequestJob implementation based on the registered
33 // interceptors and protocol factories. This will always succeed in 33 // interceptors and protocol factories. This will always succeed in
34 // returning a job unless we are--in the extreme case--out of memory. 34 // returning a job unless we are--in the extreme case--out of memory.
35 URLRequestJob* CreateJob(URLRequest* request, 35 URLRequestJob* CreateJob(URLRequest* request,
36 NetworkDelegate* network_delegate) const; 36 NetworkDelegate* network_delegate) const;
37 37
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #endif 87 #endif
88 88
89 mutable base::Lock lock_; 89 mutable base::Lock lock_;
90 90
91 DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager); 91 DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager);
92 }; 92 };
93 93
94 } // namespace net 94 } // namespace net
95 95
96 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_ 96 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
OLDNEW
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_interceptor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698