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

Side by Side Diff: net/base/platform_mime_util.h

Issue 16667019: Rename base/hash_tables to base/containers/hash_tables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/base/mime_util.cc ('k') | net/base/priority_queue.h » ('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 #ifndef NET_BASE_PLATFORM_MIME_UTIL_H_ 5 #ifndef NET_BASE_PLATFORM_MIME_UTIL_H_
6 #define NET_BASE_PLATFORM_MIME_UTIL_H_ 6 #define NET_BASE_PLATFORM_MIME_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/containers/hash_tables.h"
10 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
11 #include "base/hash_tables.h"
12 12
13 namespace net { 13 namespace net {
14 14
15 // Encapsulates the platform-specific functionality in mime_util. 15 // Encapsulates the platform-specific functionality in mime_util.
16 class PlatformMimeUtil { 16 class PlatformMimeUtil {
17 public: 17 public:
18 // See documentation for base::GetPreferredExtensionForMimeType [mime_util.h] 18 // See documentation for base::GetPreferredExtensionForMimeType [mime_util.h]
19 bool GetPreferredExtensionForMimeType( 19 bool GetPreferredExtensionForMimeType(
20 const std::string& mime_type, 20 const std::string& mime_type,
21 base::FilePath::StringType* extension) const; 21 base::FilePath::StringType* extension) const;
22 22
23 // Adds all the extensions that the platform associates with the type 23 // Adds all the extensions that the platform associates with the type
24 // |mime_type| to the set |extensions|. Returns at least the value returned 24 // |mime_type| to the set |extensions|. Returns at least the value returned
25 // by GetPreferredExtensionForMimeType. 25 // by GetPreferredExtensionForMimeType.
26 void GetPlatformExtensionsForMimeType( 26 void GetPlatformExtensionsForMimeType(
27 const std::string& mime_type, 27 const std::string& mime_type,
28 base::hash_set<base::FilePath::StringType>* extensions) const; 28 base::hash_set<base::FilePath::StringType>* extensions) const;
29 29
30 protected: 30 protected:
31 // Get the mime type (if any) that is associated with the file extension. 31 // Get the mime type (if any) that is associated with the file extension.
32 // Returns true if a corresponding mime type exists. 32 // Returns true if a corresponding mime type exists.
33 bool GetPlatformMimeTypeFromExtension(const base::FilePath::StringType& ext, 33 bool GetPlatformMimeTypeFromExtension(const base::FilePath::StringType& ext,
34 std::string* mime_type) const; 34 std::string* mime_type) const;
35 }; 35 };
36 36
37 } // namespace net 37 } // namespace net
38 38
39 #endif // NET_BASE_PLATFORM_MIME_UTIL_H_ 39 #endif // NET_BASE_PLATFORM_MIME_UTIL_H_
OLDNEW
« no previous file with comments | « net/base/mime_util.cc ('k') | net/base/priority_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698