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

Side by Side Diff: webkit/glue/simple_webmimeregistry_impl.cc

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « webkit/glue/resource_request_body_unittest.cc ('k') | webkit/glue/unittest_test_server.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 #include "webkit/glue/simple_webmimeregistry_impl.h" 5 #include "webkit/glue/simple_webmimeregistry_impl.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "net/base/mime_util.h" 10 #include "net/base/mime_util.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 WebString SimpleWebMimeRegistryImpl::mimeTypeFromFile( 132 WebString SimpleWebMimeRegistryImpl::mimeTypeFromFile(
133 const WebString& file_path) { 133 const WebString& file_path) {
134 std::string mime_type; 134 std::string mime_type;
135 net::GetMimeTypeFromFile(webkit_base::WebStringToFilePath(file_path), 135 net::GetMimeTypeFromFile(webkit_base::WebStringToFilePath(file_path),
136 &mime_type); 136 &mime_type);
137 return ASCIIToUTF16(mime_type); 137 return ASCIIToUTF16(mime_type);
138 } 138 }
139 139
140 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType( 140 WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType(
141 const WebString& mime_type) { 141 const WebString& mime_type) {
142 FilePath::StringType file_extension; 142 base::FilePath::StringType file_extension;
143 net::GetPreferredExtensionForMimeType(ToASCIIOrEmpty(mime_type), 143 net::GetPreferredExtensionForMimeType(ToASCIIOrEmpty(mime_type),
144 &file_extension); 144 &file_extension);
145 return webkit_base::FilePathStringToWebString(file_extension); 145 return webkit_base::FilePathStringToWebString(file_extension);
146 } 146 }
147 147
148 } // namespace webkit_glue 148 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/resource_request_body_unittest.cc ('k') | webkit/glue/unittest_test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698