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

Unified Diff: base/files/file_path.h

Issue 46303005: Fix chrome upload with content uri (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding unittests 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.h
diff --git a/base/files/file_path.h b/base/files/file_path.h
index 4d03da42474a871379a747b583bf6804dfbbbabf..33beb0b87039a0bad2169c938f86b62150bf5a19 100644
--- a/base/files/file_path.h
+++ b/base/files/file_path.h
@@ -387,6 +387,15 @@ class BASE_EXPORT FilePath {
const StringType& string2);
#endif
+#if defined(OS_ANDROID)
+ // On android, file selection dialog can return a file with content uri
+ // scheme(starting with content://). Content uri needs to be opened with
+ // ContentResolver to guarantee that the app has appropriate permissions
+ // to access it.
+ // Returns true if the path is a content uri, or false otherwise.
+ bool IsContentUri() const;
+#endif
+
private:
// Remove trailing separators from this object. If the path is absolute, it
// will never be stripped any more than to refer to the absolute root

Powered by Google App Engine
This is Rietveld 408576698