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

Unified Diff: net/base/platform_mime_util_linux.cc

Issue 7538029: Upstream certificate and mime Android implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DEPS Created 9 years, 5 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
Index: net/base/platform_mime_util_linux.cc
diff --git a/net/base/platform_mime_util_linux.cc b/net/base/platform_mime_util_linux.cc
index 8892668562c26e00310100c76a2d7af9b27622d4..c7202d9a4fecd7c8830faad4046c4f29b4babd8b 100644
--- a/net/base/platform_mime_util_linux.cc
+++ b/net/base/platform_mime_util_linux.cc
@@ -6,10 +6,23 @@
#include <string>
+#if defined(OS_ANDROID)
+#include "net/android/network_library.h"
+#else
#include "base/mime_util.h"
+#endif
wtc 2011/08/09 18:47:22 This should be done as follows: #include "base/mi
michaelbai 2011/08/11 16:10:18 Done.
namespace net {
+#if defined(OS_ANDROID)
+
+bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
+ const FilePath::StringType& ext, std::string* result) const {
+ return android::GetMimeTypeFromExtension(ext, result);
+}
+
+#else
+
bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
const FilePath::StringType& ext, std::string* result) const {
// TODO(thestig) This is a temporary hack until we can fix this
@@ -39,6 +52,8 @@ bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
return true;
}
+#endif
wtc 2011/08/09 18:47:22 Add a // defined(OS_ANDROID) comment.
michaelbai 2011/08/11 16:10:18 Done.
+
struct MimeToExt {
const char* mime_type;
const char* ext;

Powered by Google App Engine
This is Rietveld 408576698