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

Unified Diff: chrome/browser/icon_loader_win.cc

Issue 13812014: Added check for icons that change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes from review. Created 7 years, 8 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
« no previous file with comments | « chrome/browser/icon_loader_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/icon_loader_win.cc
diff --git a/chrome/browser/icon_loader_win.cc b/chrome/browser/icon_loader_win.cc
index e686e730b2d696cb6f5e6cd31f048a3a26e25a34..62cb6f08ee258973afcc70c8e20af3d8219f9dc9 100644
--- a/chrome/browser/icon_loader_win.cc
+++ b/chrome/browser/icon_loader_win.cc
@@ -18,11 +18,14 @@
// static
IconGroupID IconLoader::ReadGroupIDFromFilepath(
const base::FilePath& filepath) {
+ if (!IsIconMutableFromFilepath(filepath))
+ return filepath.Extension();
+ return filepath.value();
+}
+
+bool IconLoader::IsIconMutableFromFilepath(const base::FilePath& filepath) {
base::FilePath::StringType extension = filepath.Extension();
- if (extension != L".exe" && extension != L".dll" && extension != L".ico")
- return extension;
- else
- return filepath.value();
+ return extension == L".exe" || extension == L".dll" || extension == L".ico";
}
void IconLoader::ReadIcon() {
« no previous file with comments | « chrome/browser/icon_loader_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698