Removing base::ThreadRestrictions::ScopedAllowIO from icon_manager_linux.cc

Changed cache to map file paths to icons rather than by group id. Renamed
GetGroupIDFromFilepath to reflect that it can potentially do file io.

BUG=72740
TEST=Bring up downloads ui on linux and file icons still show up.

[email protected]


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192143 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/icon_loader_chromeos.cc b/chrome/browser/icon_loader_chromeos.cc
index 100f1ac..260a45e 100644
--- a/chrome/browser/icon_loader_chromeos.cc
+++ b/chrome/browser/icon_loader_chromeos.cc
@@ -9,9 +9,11 @@
 #include <utility>
 
 #include "base/bind.h"
+#include "base/files/file_path.h"
 #include "base/lazy_instance.h"
 #include "base/memory/ref_counted_memory.h"
 #include "base/message_loop.h"
+#include "base/string_util.h"
 #include "chrome/browser/icon_loader.h"
 #include "grit/theme_resources.h"
 #include "third_party/skia/include/core/SkBitmap.h"
@@ -177,6 +179,12 @@
 
 }  // namespace
 
+// static
+IconGroupID IconLoader::ReadGroupIDFromFilepath(
+    const base::FilePath& filepath) {
+  return StringToLowerASCII(filepath.Extension());
+}
+
 void IconLoader::ReadIcon() {
   static base::LazyInstance<IconMapper>::Leaky icon_mapper =
       LAZY_INSTANCE_INITIALIZER;