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

Unified Diff: chrome/browser/icon_loader_win.cc

Issue 2440273002: Clean up the IconLoader. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/icon_loader_win.cc
diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc
index 759088d34b9d6fabeaaae8b66ec221861883065d..cae14dcaa938ba438869efcffea160f76a6689e3 100644
--- a/chrome/browser/icon_loader_win.cc
+++ b/chrome/browser/icon_loader_win.cc
@@ -16,21 +16,24 @@
#include "ui/gfx/icon_util.h"
#include "ui/gfx/image/image_skia.h"
-// static
-IconGroupID IconLoader::ReadGroupIDFromFilepath(
- const base::FilePath& filepath) {
- if (!IsIconMutableFromFilepath(filepath))
- return filepath.Extension();
- return filepath.value();
-}
+namespace {
-// static
-bool IconLoader::IsIconMutableFromFilepath(const base::FilePath& filepath) {
+bool IsInstanceIconForFilepath(const base::FilePath& filepath) {
return filepath.MatchesExtension(L".exe") ||
filepath.MatchesExtension(L".dll") ||
filepath.MatchesExtension(L".ico");
}
+} // namespace
+
+// static
+IconLoader::IconGroup IconLoader::GroupForFilepath(
+ const base::FilePath& filepath) {
+ if (!IsInstanceIconForFilepath(filepath))
+ return filepath.Extension();
+ return filepath.value();
+}
+
// static
content::BrowserThread::ID IconLoader::ReadIconThreadID() {
return content::BrowserThread::FILE;

Powered by Google App Engine
This is Rietveld 408576698