Get file extension synonyms from the OS, fix so that if one synonym is safe they all are.

BUG=126088
TEST=as in bug

Review URL: https://chromiumcodereview.appspot.com/10379011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135925 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/base/platform_mime_util_linux.cc b/net/base/platform_mime_util_linux.cc
index 564dc31..f26b4533 100644
--- a/net/base/platform_mime_util_linux.cc
+++ b/net/base/platform_mime_util_linux.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -91,7 +91,7 @@
     }
   }
 
-  // TODO(dhg): Fix this the right way by implementing whats said below.
+  // TODO(dhg): Fix this the right way by implementing what's said below.
   // Unlike GetPlatformMimeTypeFromExtension, this method doesn't have a
   // default list that it uses, but for now we are also returning false since
   // this doesn't really matter as much under Linux.
@@ -104,4 +104,12 @@
   return false;
 }
 
+void PlatformMimeUtil::GetPlatformExtensionsForMimeType(
+    const std::string& mime_type,
+    base::hash_set<FilePath::StringType>* extensions) const {
+  FilePath::StringType ext;
+  if (GetPreferredExtensionForMimeType(mime_type, &ext))
+    extensions->insert(ext);
+}
+
 }  // namespace net