Chromium Code Reviews| 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..dd04fd020e21ab63130db826cbedd533cbe9dbda 100644 |
| --- a/chrome/browser/icon_loader_win.cc |
| +++ b/chrome/browser/icon_loader_win.cc |
| @@ -18,11 +18,16 @@ |
| // 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(); |
| + if (extension == L".exe" || extension == L".dll" || extension == L".ico") |
|
Robert Sesek
2013/04/09 20:13:58
Why not just return the result of this boolean exp
shatch
2013/04/09 20:43:25
Done.
|
| + return true; |
| + return false; |
| } |
| void IconLoader::ReadIcon() { |