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

Side by Side Diff: net/base/platform_mime_util_linux.cc

Issue 1897033002: Reland 'Convert //net and //chromecast to std::unordered_*' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix TestDownloadRequestHandler Created 4 years, 8 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
« no previous file with comments | « net/base/platform_mime_util.h ('k') | net/base/platform_mime_util_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/base/platform_mime_util.h ('k') | net/base/platform_mime_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698