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

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

Issue 1888963004: Add HttpProtocolHandler and convert everything to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-supports-scheme
Patch Set: rebase (needs fixing) Created 4 years, 2 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_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 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 NetworkDelegate* network_delegate, 43 NetworkDelegate* network_delegate,
44 const GURL& location) const; 44 const GURL& location) const;
45 45
46 // Allows interceptors to hijack the request after examining the response 46 // Allows interceptors to hijack the request after examining the response
47 // status and headers. This is also called when there is no server response 47 // status and headers. This is also called when there is no server response
48 // at all to allow interception of failed requests due to network errors. 48 // at all to allow interception of failed requests due to network errors.
49 // Returns NULL if no interceptor intervenes. 49 // Returns NULL if no interceptor intervenes.
50 URLRequestJob* MaybeInterceptResponse( 50 URLRequestJob* MaybeInterceptResponse(
51 URLRequest* request, NetworkDelegate* network_delegate) const; 51 URLRequest* request, NetworkDelegate* network_delegate) const;
52 52
53 // Returns true if the manager has a built-in handler for |scheme|.
54 static bool SupportsScheme(const std::string& scheme);
55
56 private: 53 private:
57 friend struct base::DefaultSingletonTraits<URLRequestJobManager>; 54 friend struct base::DefaultSingletonTraits<URLRequestJobManager>;
58 55
59 URLRequestJobManager(); 56 URLRequestJobManager();
60 ~URLRequestJobManager(); 57 ~URLRequestJobManager();
61 58
62 // The first guy to call this function sets the allowed thread. This way we 59 // The first guy to call this function sets the allowed thread. This way we
63 // avoid needing to define that thread externally. Since we expect all 60 // avoid needing to define that thread externally. Since we expect all
64 // callers to be on the same thread, we don't worry about threads racing to 61 // callers to be on the same thread, we don't worry about threads racing to
65 // set the allowed thread. 62 // set the allowed thread.
(...skipping 17 matching lines...) Expand all
83 return true; 80 return true;
84 } 81 }
85 #endif 82 #endif
86 83
87 DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager); 84 DISALLOW_COPY_AND_ASSIGN(URLRequestJobManager);
88 }; 85 };
89 86
90 } // namespace net 87 } // namespace net
91 88
92 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_ 89 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_MANAGER_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_job_factory_impl.cc ('k') | net/url_request/url_request_job_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698