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

Side by Side Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_util.h

Issue 2661003003: mediaview: Recognize more MIME types. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Utilities for ARC documents provider file system. 5 // Utilities for ARC documents provider file system.
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_
8 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ 8 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_
9 9
10 #include <string> 10 #include <string>
11 #include <vector>
11 12
12 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
13 14
14 class GURL; 15 class GURL;
15 16
16 namespace storage { 17 namespace storage {
17 class FileSystemURL; 18 class FileSystemURL;
18 } // namespace storage 19 } // namespace storage
19 20
20 namespace arc { 21 namespace arc {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // On success, true is returned. All arguments must not be nullptr. 55 // On success, true is returned. All arguments must not be nullptr.
55 bool ParseDocumentsProviderUrl(const storage::FileSystemURL& url, 56 bool ParseDocumentsProviderUrl(const storage::FileSystemURL& url,
56 std::string* authority, 57 std::string* authority,
57 std::string* root_document_id, 58 std::string* root_document_id,
58 base::FilePath* path); 59 base::FilePath* path);
59 60
60 // C++ implementation of DocumentsContract.buildDocumentUri() in Android. 61 // C++ implementation of DocumentsContract.buildDocumentUri() in Android.
61 GURL BuildDocumentUrl(const std::string& authority, 62 GURL BuildDocumentUrl(const std::string& authority,
62 const std::string& document_id); 63 const std::string& document_id);
63 64
65 // Similar to net::GetExtensionsForMimeType(), but this covers more MIME types
66 // used in Android.
67 // Returns an empty vector if the MIME type is not known.
68 // If the returned vector is not empty, the first extension is the preferred
69 // extension.
70 std::vector<base::FilePath::StringType> GetExtensionsForArcMimeType(
71 const std::string& mime_type);
72
64 } // namespace arc 73 } // namespace arc
65 74
66 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_ 75 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698