| 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 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // If we wanted to do this properly, we would read the mime.cache file which | 95 // If we wanted to do this properly, we would read the mime.cache file which |
| 96 // has a section where they assign a glob (*.gif) to a mimetype | 96 // has a section where they assign a glob (*.gif) to a mimetype |
| 97 // (image/gif). We look up the "heaviest" glob for a certain mime type and | 97 // (image/gif). We look up the "heaviest" glob for a certain mime type and |
| 98 // then then try to chop off "*.". | 98 // then then try to chop off "*.". |
| 99 | 99 |
| 100 return false; | 100 return false; |
| 101 } | 101 } |
| 102 | 102 |
| 103 void PlatformMimeUtil::GetPlatformExtensionsForMimeType( | 103 void PlatformMimeUtil::GetPlatformExtensionsForMimeType( |
| 104 const std::string& mime_type, | 104 const std::string& mime_type, |
| 105 base::hash_set<base::FilePath::StringType>* extensions) const { | 105 std::unordered_set<base::FilePath::StringType>* extensions) const { |
| 106 base::FilePath::StringType ext; | 106 base::FilePath::StringType ext; |
| 107 if (GetPreferredExtensionForMimeType(mime_type, &ext)) | 107 if (GetPreferredExtensionForMimeType(mime_type, &ext)) |
| 108 extensions->insert(ext); | 108 extensions->insert(ext); |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace net | 111 } // namespace net |
| OLD | NEW |