OLD | NEW |
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 #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 "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 } // namespace | 30 } // namespace |
31 | 31 |
32 static const SchemeToFactory kBuiltinFactories[] = { | 32 static const SchemeToFactory kBuiltinFactories[] = { |
33 { "http", URLRequestHttpJob::Factory }, | 33 { "http", URLRequestHttpJob::Factory }, |
34 { "https", URLRequestHttpJob::Factory }, | 34 { "https", URLRequestHttpJob::Factory }, |
35 | 35 |
36 #if !defined(OS_IOS) | 36 #if !defined(OS_IOS) |
37 { "ws", URLRequestHttpJob::Factory }, | 37 { "ws", URLRequestHttpJob::Factory }, |
38 { "wss", URLRequestHttpJob::Factory }, | 38 { "wss", URLRequestHttpJob::Factory }, |
39 #endif // !defined(OS_IOS) | 39 #endif // !defined(OS_IOS) |
40 | |
41 }; | 40 }; |
42 | 41 |
43 // static | 42 // static |
44 URLRequestJobManager* URLRequestJobManager::GetInstance() { | 43 URLRequestJobManager* URLRequestJobManager::GetInstance() { |
45 return Singleton<URLRequestJobManager>::get(); | 44 return Singleton<URLRequestJobManager>::get(); |
46 } | 45 } |
47 | 46 |
48 URLRequestJob* URLRequestJobManager::CreateJob( | 47 URLRequestJob* URLRequestJobManager::CreateJob( |
49 URLRequest* request, NetworkDelegate* network_delegate) const { | 48 URLRequest* request, NetworkDelegate* network_delegate) const { |
50 DCHECK(IsAllowedThread()); | 49 DCHECK(IsAllowedThread()); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 } | 247 } |
249 | 248 |
250 URLRequestJobManager::URLRequestJobManager() | 249 URLRequestJobManager::URLRequestJobManager() |
251 : allowed_thread_(0), | 250 : allowed_thread_(0), |
252 allowed_thread_initialized_(false) { | 251 allowed_thread_initialized_(false) { |
253 } | 252 } |
254 | 253 |
255 URLRequestJobManager::~URLRequestJobManager() {} | 254 URLRequestJobManager::~URLRequestJobManager() {} |
256 | 255 |
257 } // namespace net | 256 } // namespace net |
OLD | NEW |