diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-14 18:59:55 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-14 18:59:55 +0000 |
commit | 5565316246b58c1168fb10e9439fc903ebb8faa6 (patch) | |
tree | 7f497b09f9fa21b3ad9ff10f5f3091d29d159c11 /base/memory/ref_counted_memory.cc | |
parent | 1dcf97bb29b98046aa9856545ae12755ee91c6da (diff) | |
download | chromium_src-5565316246b58c1168fb10e9439fc903ebb8faa6.zip chromium_src-5565316246b58c1168fb10e9439fc903ebb8faa6.tar.gz chromium_src-5565316246b58c1168fb10e9439fc903ebb8faa6.tar.bz2 |
Avoid sending notifications when the bitmap data in the history backend is replaced with bitmap data which is byte for byte equal.
Bug=168223
Test=HistoryBackendTest.*
Manual: see comment #7 in bug
Review URL: https://chromiumcodereview.appspot.com/11830007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/memory/ref_counted_memory.cc')
-rw-r--r-- | base/memory/ref_counted_memory.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/memory/ref_counted_memory.cc b/base/memory/ref_counted_memory.cc index 9bcde32..b048a6e 100644 --- a/base/memory/ref_counted_memory.cc +++ b/base/memory/ref_counted_memory.cc @@ -8,6 +8,13 @@ namespace base { +bool RefCountedMemory::Equals( + const scoped_refptr<RefCountedMemory>& other) const { + return other.get() && + size() == other->size() && + (memcmp(front(), other->front(), size()) == 0); +} + RefCountedMemory::RefCountedMemory() {} RefCountedMemory::~RefCountedMemory() {} |