Chromium Code Reviews| Index: ui/gfx/icon_util.h |
| diff --git a/ui/gfx/icon_util.h b/ui/gfx/icon_util.h |
| index 7ce5606f525d0f7b92b6ceaef7158ca0e1dec360..61174bbf91c80bd24f4fe5d2fec3301e18bd7d43 100644 |
| --- a/ui/gfx/icon_util.h |
| +++ b/ui/gfx/icon_util.h |
| @@ -18,6 +18,7 @@ |
| namespace base { |
| class FilePath; |
| +struct MD5Digest; |
| } |
| namespace gfx { |
| @@ -136,6 +137,19 @@ class UI_EXPORT IconUtil { |
| const void* dib_bits, |
| size_t dib_size); |
| + // Calculates checksum of an icon family using MD5. |
| + // The checksum is derived from all of the icons in the family. |
| + static void GetImageCheckSum(const gfx::ImageFamily& image, |
| + base::MD5Digest* digest); |
|
Alexei Svitkine (slow)
2013/05/09 15:34:57
Can this be private to the implementation, in an a
|
| + |
| + // Saves |image| as an |icon_file| with the checksum. |
|
Alexei Svitkine (slow)
2013/05/09 15:34:57
Please expand the comment to mention how this actu
|
| + static bool SaveIconWithCheckSum(const base::FilePath& icon_file, |
| + const gfx::ImageFamily& image); |
| + |
| + // Returns true if |icon_file| is missing or different from |image|. |
| + static bool ShouldUpdateIcon(const base::FilePath& icon_file, |
|
Alexei Svitkine (slow)
2013/05/09 15:34:57
Could you write a simple unit test for this?
|
| + const gfx::ImageFamily& image); |
| + |
| private: |
| // The icon format is published in the MSDN but there is no definition of |
| // the icon file structures in any of the Windows header files so we need to |