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

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

Issue 7944011: aura: Make 'net' build with gtk disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 3 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 | « no previous file | net/net.gyp » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "build/build_config.h" 10 #include "build/build_config.h"
10 11
11 #if defined(OS_ANDROID) 12 #if defined(OS_ANDROID)
12 #include "net/android/network_library.h" 13 #include "net/android/network_library.h"
13 #else 14 #else
14 #include "base/mime_util.h" 15 #include "base/mime_util.h"
15 #endif 16 #endif
16 17
17 namespace net { 18 namespace net {
18 19
19 #if defined(OS_ANDROID) 20 #if defined(OS_ANDROID)
20
21 bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension( 21 bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
22 const FilePath::StringType& ext, std::string* result) const { 22 const FilePath::StringType& ext, std::string* result) const {
23 return android::GetMimeTypeFromExtension(ext, result); 23 return android::GetMimeTypeFromExtension(ext, result);
24 } 24 }
25 25 #elif defined(USE_AURA)
26 bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
27 const FilePath::StringType& ext, std::string* result) const {
28 NOTIMPLEMENTED();
29 return false;
30 }
26 #else 31 #else
27
28 bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension( 32 bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension(
29 const FilePath::StringType& ext, std::string* result) const { 33 const FilePath::StringType& ext, std::string* result) const {
30 // TODO(thestig) This is a temporary hack until we can fix this 34 // TODO(thestig) This is a temporary hack until we can fix this
31 // properly in test shell / webkit. 35 // properly in test shell / webkit.
32 // We have to play dumb and not return application/x-perl here 36 // We have to play dumb and not return application/x-perl here
33 // to make the reload-subframe-object layout test happy. 37 // to make the reload-subframe-object layout test happy.
34 if (ext == "pl") 38 if (ext == "pl")
35 return false; 39 return false;
36 40
37 FilePath dummy_path("foo." + ext); 41 FilePath dummy_path("foo." + ext);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // 98 //
95 // If we wanted to do this properly, we would read the mime.cache file which 99 // 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 100 // 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 101 // (image/gif). We look up the "heaviest" glob for a certain mime type and
98 // then then try to chop off "*.". 102 // then then try to chop off "*.".
99 103
100 return false; 104 return false;
101 } 105 }
102 106
103 } // namespace net 107 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698