Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "net/base/platform_mime_util.h" | 5 #include "net/base/platform_mime_util.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/mac/foundation_util.h" | 11 #include "base/mac/foundation_util.h" |
| 12 #include "base/mac/scoped_cftyperef.h" | 12 #include "base/mac/scoped_cftyperef.h" |
| 13 #import "base/memory/scoped_nsobject.h" | 13 #import "base/mac/scoped_nsobject.h" |
|
Mark Mentovai
2013/06/24 21:37:28
DIWYDU.
| |
| 14 #include "base/strings/sys_string_conversions.h" | 14 #include "base/strings/sys_string_conversions.h" |
| 15 | 15 |
| 16 #if defined(OS_IOS) | 16 #if defined(OS_IOS) |
| 17 #include <MobileCoreServices/MobileCoreServices.h> | 17 #include <MobileCoreServices/MobileCoreServices.h> |
| 18 #else | 18 #else |
| 19 #include <CoreServices/CoreServices.h> | 19 #include <CoreServices/CoreServices.h> |
| 20 #endif // defined(OS_IOS) | 20 #endif // defined(OS_IOS) |
| 21 | 21 |
| 22 #if !defined(OS_IOS) | 22 #if !defined(OS_IOS) |
| 23 // SPI declaration; see the commentary in GetPlatformExtensionsForMimeType. | 23 // SPI declaration; see the commentary in GetPlatformExtensionsForMimeType. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 extensions->insert(base::SysNSStringToUTF8(extension)); | 97 extensions->insert(base::SysNSStringToUTF8(extension)); |
| 98 } else { | 98 } else { |
| 99 // Huh? Give up. | 99 // Huh? Give up. |
| 100 base::FilePath::StringType ext; | 100 base::FilePath::StringType ext; |
| 101 if (GetPreferredExtensionForMimeType(mime_type, &ext)) | 101 if (GetPreferredExtensionForMimeType(mime_type, &ext)) |
| 102 extensions->insert(ext); | 102 extensions->insert(ext); |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace net | 106 } // namespace net |
| OLD | NEW |