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

Unified Diff: ui/gfx/icon_util.h

Issue 14137032: Create profile .ico file on profile creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use important_file_handler for icon file creation Created 7 years, 7 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: ui/gfx/icon_util.h
diff --git a/ui/gfx/icon_util.h b/ui/gfx/icon_util.h
index 7ce5606f525d0f7b92b6ceaef7158ca0e1dec360..f68d78498171eb3a22802a0fff1688db6bb643c2 100644
--- a/ui/gfx/icon_util.h
+++ b/ui/gfx/icon_util.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
+#include "base/md5.h"
#include "base/memory/scoped_ptr.h"
#include "ui/base/ui_export.h"
#include "ui/gfx/point.h"
@@ -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);
gab 2013/05/08 13:01:08 Forward-declare base::MD5Digest instead of includi
calamity 2013/05/09 06:12:16 Done in new CL.
+
+ // Saves |image| as an |icon_file| with the checksum.
+ 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,
+ 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

Powered by Google App Engine
This is Rietveld 408576698