OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "net/url_request/url_request_job_manager.h" | 5 #include "net/url_request/url_request_job_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 struct SchemeToFactory { | 24 struct SchemeToFactory { |
25 const char* scheme; | 25 const char* scheme; |
26 net::URLRequest::ProtocolFactory* factory; | 26 net::URLRequest::ProtocolFactory* factory; |
27 }; | 27 }; |
28 | 28 |
29 } // namespace | 29 } // namespace |
30 | 30 |
31 static const SchemeToFactory kBuiltinFactories[] = { | 31 static const SchemeToFactory kBuiltinFactories[] = { |
32 { "http", URLRequestHttpJob::Factory }, | 32 { "http", URLRequestHttpJob::Factory }, |
33 { "https", URLRequestHttpJob::Factory }, | 33 { "https", URLRequestHttpJob::Factory }, |
34 { "file", URLRequestFileJob::Factory }, | 34 { "file", net::URLRequestFileJob::Factory }, |
35 { "ftp", net::URLRequestFtpJob::Factory }, | 35 { "ftp", net::URLRequestFtpJob::Factory }, |
36 { "about", net::URLRequestAboutJob::Factory }, | 36 { "about", net::URLRequestAboutJob::Factory }, |
37 { "data", URLRequestDataJob::Factory }, | 37 { "data", URLRequestDataJob::Factory }, |
38 }; | 38 }; |
39 | 39 |
40 URLRequestJobManager::URLRequestJobManager() : enable_file_access_(false) { | 40 URLRequestJobManager::URLRequestJobManager() : enable_file_access_(false) { |
41 #ifndef NDEBUG | 41 #ifndef NDEBUG |
42 allowed_thread_ = 0; | 42 allowed_thread_ = 0; |
43 allowed_thread_initialized_ = false; | 43 allowed_thread_initialized_ = false; |
44 #endif | 44 #endif |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 DCHECK(IsAllowedThread()); | 205 DCHECK(IsAllowedThread()); |
206 #endif | 206 #endif |
207 | 207 |
208 AutoLock locked(lock_); | 208 AutoLock locked(lock_); |
209 | 209 |
210 InterceptorList::iterator i = | 210 InterceptorList::iterator i = |
211 std::find(interceptors_.begin(), interceptors_.end(), interceptor); | 211 std::find(interceptors_.begin(), interceptors_.end(), interceptor); |
212 DCHECK(i != interceptors_.end()); | 212 DCHECK(i != interceptors_.end()); |
213 interceptors_.erase(i); | 213 interceptors_.erase(i); |
214 } | 214 } |
OLD | NEW |