From 64b421f984b2dfe04546729f8b35648cac3d0f20 Mon Sep 17 00:00:00 2001 From: "jeremy@chromium.org" Date: Wed, 17 Sep 2008 19:41:59 +0000 Subject: Review URL: http://codereview.chromium.org/2942 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2321 0039d316-1c4b-4281-b951-d872f2087c98 --- net/net.xcodeproj/project.pbxproj | 2 ++ net/url_request/url_request_job_manager.cc | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/net/net.xcodeproj/project.pbxproj b/net/net.xcodeproj/project.pbxproj index 983d512..89a3146 100644 --- a/net/net.xcodeproj/project.pbxproj +++ b/net/net.xcodeproj/project.pbxproj @@ -124,6 +124,7 @@ 821F23CC0E5E106D003C7E38 /* url_request_simple_job.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED339C0E5A198600A747DB /* url_request_simple_job.cc */; }; 825C2FCC0E5C968B00FDEAB7 /* ev_root_ca_metadata.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED32BE0E5A181C00A747DB /* ev_root_ca_metadata.cc */; }; 82ECB3090E5B651D00A913E3 /* mime_sniffer.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED32AD0E5A181C00A747DB /* mime_sniffer.cc */; }; + B5F622260E805FC40076681A /* url_request_job_manager.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED33A30E5A198600A747DB /* url_request_job_manager.cc */; }; BAA46E3B0E5CE99A00E77460 /* net_util_unittest.cc in Sources */ = {isa = PBXBuildFile; fileRef = 7BED329F0E5A181C00A747DB /* net_util_unittest.cc */; }; E4AFA6430E5241B400201347 /* run_all_unittests.cc in Sources */ = {isa = PBXBuildFile; fileRef = E4AFA6420E5241B400201347 /* run_all_unittests.cc */; }; /* End PBXBuildFile section */ @@ -1276,6 +1277,7 @@ 7B85044A0E5B2E9600730B43 /* url_request_error_job.cc in Sources */, 821F236C0E5E0EF8003C7E38 /* url_request_http_job.cc in Sources */, 821F23CA0E5E106B003C7E38 /* url_request_job.cc in Sources */, + B5F622260E805FC40076681A /* url_request_job_manager.cc in Sources */, 7B8504530E5B2E9600730B43 /* url_request_job_metrics.cc in Sources */, 7B8504540E5B2E9600730B43 /* url_request_job_tracker.cc in Sources */, 821F23CC0E5E106D003C7E38 /* url_request_simple_job.cc in Sources */, diff --git a/net/url_request/url_request_job_manager.cc b/net/url_request/url_request_job_manager.cc index 711917e..b04e13c 100644 --- a/net/url_request/url_request_job_manager.cc +++ b/net/url_request/url_request_job_manager.cc @@ -4,24 +4,39 @@ #include "net/url_request/url_request_job_manager.h" +#include "build/build_config.h" #include "base/string_util.h" #include "net/base/load_flags.h" #include "net/url_request/url_request_about_job.h" #include "net/url_request/url_request_error_job.h" +#if defined(OS_WIN) #include "net/url_request/url_request_file_job.h" #include "net/url_request/url_request_ftp_job.h" +#else +// TODO(playmobil): Implement on non-windows platforms. +#endif #include "net/url_request/url_request_http_job.h" #include "net/url_request/url_request_view_cache_job.h" // The built-in set of protocol factories -static const struct { +namespace { + +struct SchemeToFactory { const char* scheme; URLRequest::ProtocolFactory* factory; -} kBuiltinFactories[] = { +}; + +} // namespace + +static const SchemeToFactory kBuiltinFactories[] = { { "http", URLRequestHttpJob::Factory }, { "https", URLRequestHttpJob::Factory }, +#if defined(OS_WIN) { "file", URLRequestFileJob::Factory }, { "ftp", URLRequestFtpJob::Factory }, +#else +// TODO(playmobil): Implement on non-windows platforms. +#endif { "about", URLRequestAboutJob::Factory }, { "view-cache", URLRequestViewCacheJob::Factory }, }; -- cgit v1.1