summaryrefslogtreecommitdiffstats
path: root/components/enhanced_bookmarks/test_image_store.cc
diff options
context:
space:
mode:
authorkkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 20:35:46 +0000
committerkkimlabs@chromium.org <kkimlabs@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-15 20:35:46 +0000
commit38be420f6c40d226438d85ff088e334ed1b2f4a8 (patch)
tree01a4c1524d669407d4047fb9373aeaa5bf813d63 /components/enhanced_bookmarks/test_image_store.cc
parent9fab5f375696a25d7d37199d4646a6f18d6cb869 (diff)
downloadchromium_src-38be420f6c40d226438d85ff088e334ed1b2f4a8.zip
chromium_src-38be420f6c40d226438d85ff088e334ed1b2f4a8.tar.gz
chromium_src-38be420f6c40d226438d85ff088e334ed1b2f4a8.tar.bz2
Change ImageStore to use SequenceChecker instead of ThreadChecker.
We will be using ImageStore with BrowserThread::PostBlockingPoolSequencedTask which doesn't always guarantee same thread execution. BUG=368034 Review URL: https://codereview.chromium.org/288573003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/enhanced_bookmarks/test_image_store.cc')
-rw-r--r--components/enhanced_bookmarks/test_image_store.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/enhanced_bookmarks/test_image_store.cc b/components/enhanced_bookmarks/test_image_store.cc
index dacb7c9..c96f3cf 100644
--- a/components/enhanced_bookmarks/test_image_store.cc
+++ b/components/enhanced_bookmarks/test_image_store.cc
@@ -11,7 +11,7 @@ TestImageStore::TestImageStore() {
}
bool TestImageStore::HasKey(const GURL& page_url) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
return store_.find(page_url) != store_.end();
}
@@ -19,7 +19,7 @@ bool TestImageStore::HasKey(const GURL& page_url) {
void TestImageStore::Insert(const GURL& page_url,
const GURL& image_url,
const gfx::Image& image) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
Erase(page_url);
store_.insert(std::make_pair(
@@ -29,13 +29,13 @@ void TestImageStore::Insert(const GURL& page_url,
}
void TestImageStore::Erase(const GURL& page_url) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
store_.erase(page_url);
}
std::pair<gfx::Image, GURL> TestImageStore::Get(const GURL& page_url) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
ImageMap::const_iterator pair_enumerator = store_.find(page_url);
if (pair_enumerator == store_.end())
@@ -45,7 +45,7 @@ std::pair<gfx::Image, GURL> TestImageStore::Get(const GURL& page_url) {
}
gfx::Size TestImageStore::GetSize(const GURL& page_url) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
ImageMap::const_iterator pair_enumerator = store_.find(page_url);
if (pair_enumerator == store_.end())
@@ -55,7 +55,7 @@ gfx::Size TestImageStore::GetSize(const GURL& page_url) {
}
void TestImageStore::GetAllPageUrls(std::set<GURL>* urls) {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
DCHECK(urls->empty());
for (ImageMap::const_iterator it = store_.begin(); it != store_.end(); ++it)
@@ -63,11 +63,11 @@ void TestImageStore::GetAllPageUrls(std::set<GURL>* urls) {
}
void TestImageStore::ClearAll() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
store_.clear();
}
TestImageStore::~TestImageStore() {
- DCHECK(thread_checker_.CalledOnValidThread());
+ DCHECK(sequence_checker_.CalledOnValidSequencedThread());
}