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

Unified Diff: net/base/platform_mime_util_linux.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 ff7f79b1549fe81313df94c66e572f0a5b739926..ea57595de24dfa0eb7aed98a9767b9e97452c736 100644
--- a/net/base/platform_mime_util_linux.cc
+++ b/net/base/platform_mime_util_linux.cc
@@ -19,12 +19,14 @@ namespace net {
#if defined(OS_ANDROID)
bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
- const base::FilePath::StringType& ext, std::string* result) const {
+ const base::FilePath::StringType& ext,
+ std::string* result) const {
return android::GetMimeTypeFromExtension(ext, result);
}
#else
bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
- const base::FilePath::StringType& ext, std::string* result) const {
+ const base::FilePath::StringType& ext,
+ std::string* result) const {
// TODO(thestig): This is a temporary hack until we can fix this
// properly in test shell / webkit.
// We have to play dumb and not return application/x-perl here
@@ -60,26 +62,24 @@ struct MimeToExt {
};
const struct MimeToExt mime_type_ext_map[] = {
- {"application/pdf", "pdf"},
- {"application/x-tar", "tar"},
- {"application/zip", "zip"},
- {"audio/mpeg", "mp3"},
- {"image/gif", "gif"},
- {"image/jpeg", "jpg"},
- {"image/png", "png"},
- {"text/html", "html"},
- {"video/mp4", "mp4"},
- {"video/mpeg", "mpg"},
- {"text/plain", "txt"},
- {"text/x-sh", "sh"},
+ {"application/pdf", "pdf"},
+ {"application/x-tar", "tar"},
+ {"application/zip", "zip"},
+ {"audio/mpeg", "mp3"},
+ {"image/gif", "gif"},
+ {"image/jpeg", "jpg"},
+ {"image/png", "png"},
+ {"text/html", "html"},
+ {"video/mp4", "mp4"},
+ {"video/mpeg", "mpg"},
+ {"text/plain", "txt"},
+ {"text/x-sh", "sh"},
};
bool PlatformMimeUtil::GetPreferredExtensionForMimeType(
- const std::string& mime_type, base::FilePath::StringType* ext) const {
-
- for (size_t x = 0;
- x < (sizeof(mime_type_ext_map) / sizeof(MimeToExt));
- x++) {
+ const std::string& mime_type,
+ base::FilePath::StringType* ext) const {
+ for (size_t x = 0; x < (sizeof(mime_type_ext_map) / sizeof(MimeToExt)); x++) {
if (mime_type_ext_map[x].mime_type == mime_type) {
*ext = mime_type_ext_map[x].ext;
return true;

Powered by Google App Engine
This is Rietveld 408576698