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

Unified Diff: net/url_request/file_protocol_handler.cc

Issue 739033003: Support content scheme uri for Chrome on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
Index: net/url_request/file_protocol_handler.cc
diff --git a/net/url_request/file_protocol_handler.cc b/net/url_request/file_protocol_handler.cc
index ceed930985cd8514ca2d7c9b1209af5e71b5880b..a71bfdecb416f2af3b3eb6bbaec1893fa815f93d 100644
--- a/net/url_request/file_protocol_handler.cc
+++ b/net/url_request/file_protocol_handler.cc
@@ -23,6 +23,14 @@ FileProtocolHandler::~FileProtocolHandler() {}
URLRequestJob* FileProtocolHandler::MaybeCreateJob(
URLRequest* request, NetworkDelegate* network_delegate) const {
+#if defined(OS_ANDROID)
+ if (request->url().SchemeIs("content")) {
+ return new URLRequestFileJob(
+ request, network_delegate, base::FilePath(request->url().spec()),
palmer 2014/11/19 00:23:54 Will content://data/data/org.chromium.blah/foo/Pro
qinmin 2014/11/19 02:13:07 no, android ContentResolver has it's own permissio
+ file_task_runner_);
+ }
+#endif
+
base::FilePath file_path;
const bool is_file = FileURLToFilePath(request->url(), &file_path);

Powered by Google App Engine
This is Rietveld 408576698