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

Unified Diff: base/files/file_path.cc

Issue 46303005: Fix chrome upload with content uri (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressing tsepez's comments Created 7 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: base/files/file_path.cc
diff --git a/base/files/file_path.cc b/base/files/file_path.cc
index cfae3a54e98660b5074b6d184e972d0248476177..c6e1a3e105d3e4cc726186275b79dfe62be9fb39 100644
--- a/base/files/file_path.cc
+++ b/base/files/file_path.cc
@@ -1280,6 +1280,17 @@ FilePath FilePath::NormalizePathSeparators() const {
#endif
}
+#if defined(OS_ANDROID)
+bool FilePath::IsContentUri() const {
+ std::string content_scheme = "content://";
+ size_t len = content_scheme.length();
+ return path_.length() > len &&
+ StartsWithASCII(path_, "content://", false /*case_sensitive*/) &&
+ ((path_[len] >= L'A' && path_[len] <= L'Z') ||
jar (doing other things) 2013/11/13 01:03:28 Why do you care if the path (authority?) begins wi
qinmin 2013/11/13 23:42:43 Done, removed the path check.
+ (path_[len] >= L'a' && path_[len] <= L'z'));
+}
+#endif
+
} // namespace base
void PrintTo(const base::FilePath& path, std::ostream* out) {

Powered by Google App Engine
This is Rietveld 408576698