| 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 const char* scheme; | 30 const char* scheme; |
| 31 URLRequest::ProtocolFactory* factory; | 31 URLRequest::ProtocolFactory* factory; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 static const SchemeToFactory kBuiltinFactories[] = { | 36 static const SchemeToFactory kBuiltinFactories[] = { |
| 37 { "http", URLRequestHttpJob::Factory }, | 37 { "http", URLRequestHttpJob::Factory }, |
| 38 { "https", URLRequestHttpJob::Factory }, | 38 { "https", URLRequestHttpJob::Factory }, |
| 39 { "file", URLRequestFileJob::Factory }, | 39 { "file", URLRequestFileJob::Factory }, |
| 40 #if !defined(DISABLE_FTP_SUPPORT) |
| 40 { "ftp", URLRequestFtpJob::Factory }, | 41 { "ftp", URLRequestFtpJob::Factory }, |
| 42 #endif |
| 41 { "about", URLRequestAboutJob::Factory }, | 43 { "about", URLRequestAboutJob::Factory }, |
| 42 { "data", URLRequestDataJob::Factory }, | 44 { "data", URLRequestDataJob::Factory }, |
| 43 }; | 45 }; |
| 44 | 46 |
| 45 // static | 47 // static |
| 46 URLRequestJobManager* URLRequestJobManager::GetInstance() { | 48 URLRequestJobManager* URLRequestJobManager::GetInstance() { |
| 47 return Singleton<URLRequestJobManager>::get(); | 49 return Singleton<URLRequestJobManager>::get(); |
| 48 } | 50 } |
| 49 | 51 |
| 50 URLRequestJob* URLRequestJobManager::CreateJob( | 52 URLRequestJob* URLRequestJobManager::CreateJob( |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 } | 268 } |
| 267 | 269 |
| 268 URLRequestJobManager::URLRequestJobManager() | 270 URLRequestJobManager::URLRequestJobManager() |
| 269 : allowed_thread_(0), | 271 : allowed_thread_(0), |
| 270 allowed_thread_initialized_(false) { | 272 allowed_thread_initialized_(false) { |
| 271 } | 273 } |
| 272 | 274 |
| 273 URLRequestJobManager::~URLRequestJobManager() {} | 275 URLRequestJobManager::~URLRequestJobManager() {} |
| 274 | 276 |
| 275 } // namespace net | 277 } // namespace net |
| OLD | NEW |