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

Side by Side Diff: base/memory/ref_counted_memory.cc

Issue 11830007: Avoid sending notifications when the bitmap data in history has not changed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Split the changes to MergeFavicon() and SetFavicons() into two CLs as only the changes to MergeFavi… Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/memory/ref_counted_memory.h ('k') | base/memory/ref_counted_memory_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/ref_counted_memory.h" 5 #include "base/memory/ref_counted_memory.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace base { 9 namespace base {
10 10
11 bool RefCountedMemory::Equals(
12 const scoped_refptr<RefCountedMemory>& other) const {
13 return other.get() &&
14 size() == other->size() &&
15 (memcmp(front(), other->front(), size()) == 0);
16 }
17
11 RefCountedMemory::RefCountedMemory() {} 18 RefCountedMemory::RefCountedMemory() {}
12 19
13 RefCountedMemory::~RefCountedMemory() {} 20 RefCountedMemory::~RefCountedMemory() {}
14 21
15 const unsigned char* RefCountedStaticMemory::front() const { 22 const unsigned char* RefCountedStaticMemory::front() const {
16 return data_; 23 return data_;
17 } 24 }
18 25
19 size_t RefCountedStaticMemory::size() const { 26 size_t RefCountedStaticMemory::size() const {
20 return length_; 27 return length_;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 const unsigned char* RefCountedString::front() const { 68 const unsigned char* RefCountedString::front() const {
62 return data_.empty() ? NULL : 69 return data_.empty() ? NULL :
63 reinterpret_cast<const unsigned char*>(data_.data()); 70 reinterpret_cast<const unsigned char*>(data_.data());
64 } 71 }
65 72
66 size_t RefCountedString::size() const { 73 size_t RefCountedString::size() const {
67 return data_.size(); 74 return data_.size();
68 } 75 }
69 76
70 } // namespace base 77 } // namespace base
OLDNEW
« no previous file with comments | « base/memory/ref_counted_memory.h ('k') | base/memory/ref_counted_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698