diff options
author | peter@chromium.org <peter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-06 12:27:08 +0000 |
---|---|---|
committer | peter@chromium.org <peter@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-06 12:27:08 +0000 |
commit | 2bde228857a4a256c776dea58885e6838680cb33 (patch) | |
tree | 408b02504ad5b38dea2feaa9940c4464ca70a4a3 /net/android/network_library.cc | |
parent | a2dedddc1d36eb19f39c1e20b8b6ebddc2e073d5 (diff) | |
download | chromium_src-2bde228857a4a256c776dea58885e6838680cb33.zip chromium_src-2bde228857a4a256c776dea58885e6838680cb33.tar.gz chromium_src-2bde228857a4a256c776dea58885e6838680cb33.tar.bz2 |
Stop emitting warnings for mime types not recognized by Android.
Chromium attempts to get mime types based on extensions by (1) checking
the primary list in mime_util.cc, (2) querying the OS for the mime type or
(3) checking the list of secondary mappings.
For Android, a warning message is being emitted when an extension can't
be found during step (2), which calls URLConnection.guessContentTypeFromName
in Java. The most common extension causing the warning is "js", which will be
resolved as part of the secondary mappings in step (3). This voids the warning.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11293101
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/android/network_library.cc')
-rw-r--r-- | net/android/network_library.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/android/network_library.cc b/net/android/network_library.cc index 6a5b592..b53cefe 100644 --- a/net/android/network_library.cc +++ b/net/android/network_library.cc @@ -81,11 +81,8 @@ bool GetMimeTypeFromExtension(const std::string& extension, Java_AndroidNetworkLibrary_getMimeTypeFromExtension( env, extension_string.obj()); - if (!ret.obj()) { - LOG(WARNING) << "Call to getMimeTypeFromExtension failed for extension: " - << extension; + if (!ret.obj()) return false; - } *result = ConvertJavaStringToUTF8(ret); return true; } |