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

Unified Diff: chrome/browser/android/android_protocol_adapter.cc

Issue 10836206: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added includes for Android Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_io_data.cc » ('j') | net/url_request/url_request_http_job.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/android_protocol_adapter.cc
diff --git a/chrome/browser/android/android_protocol_adapter.cc b/chrome/browser/android/android_protocol_adapter.cc
index 3229ee49dd272ce40ef47b21fc2606290547ecd3..836f5975b69a8ea1a324ed78a2497b90b63df1ca 100644
--- a/chrome/browser/android/android_protocol_adapter.cc
+++ b/chrome/browser/android/android_protocol_adapter.cc
@@ -19,8 +19,10 @@
#include "net/base/net_errors.h"
#include "net/base/net_util.h"
#include "net/http/http_util.h"
+#include "net/url_request/url_request.h"
+#include "net/url_request/url_request_context.h"
+#include "net/url_request/file_protocol_handler.h"
#include "net/url_request/url_request_error_job.h"
-#include "net/url_request/url_request_file_job.h"
#include "net/url_request/url_request_job_manager.h"
using base::android::AttachCurrentThread;
@@ -90,7 +92,9 @@ net::URLRequestJob* AndroidProtocolAdapter::Factory(
if (scheme == chrome::kFileScheme &&
!StartsWithASCII(url, assetPrefix, /*case_sensitive=*/ true) &&
!StartsWithASCII(url, resourcePrefix, /*case_sensitive=*/ true)) {
- return net::URLRequestFileJob::Factory(request, scheme);
+ net::FileProtocolHandler file_protocol_handler(
+ request->context()->network_delegate());
+ return file_protocol_handler.MaybeCreateJob(request);
}
return new AndroidStreamReaderURLRequestJob(
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_io_data.cc » ('j') | net/url_request/url_request_http_job.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698