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

Side by Side Diff: components/enhanced_bookmarks/image_store.h

Issue 288573003: Change ImageStore to use SequenceChecker instead of ThreadChecker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git log Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/enhanced_bookmarks/image_store.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ 5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_
6 #define COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ 6 #define COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "base/threading/thread_checker.h" 11 #include "base/sequence_checker.h"
12 #include "ui/gfx/image/image.h" 12 #include "ui/gfx/image/image.h"
13 13
14 class GURL; 14 class GURL;
15 15
16 // The ImageStore keeps an image for each URL. This class is not thread safe, 16 // The ImageStore keeps an image for each URL. This class is not thread safe,
17 // and will check the thread using base::ThreadChecker, except the constructor. 17 // and will check the thread using base::ThreadChecker, except the constructor.
18 class ImageStore { 18 class ImageStore {
19 public: 19 public:
20 ImageStore(); 20 ImageStore();
21 virtual ~ImageStore(); 21 virtual ~ImageStore();
(...skipping 24 matching lines...) Expand all
46 // Populates |urls| with all the urls that have an image in the store. 46 // Populates |urls| with all the urls that have an image in the store.
47 virtual void GetAllPageUrls(std::set<GURL>* urls) = 0; 47 virtual void GetAllPageUrls(std::set<GURL>* urls) = 0;
48 48
49 // Removes all images. 49 // Removes all images.
50 virtual void ClearAll() = 0; 50 virtual void ClearAll() = 0;
51 51
52 // Moves an image from one url to another. 52 // Moves an image from one url to another.
53 void ChangeImageURL(const GURL& from, const GURL& to); 53 void ChangeImageURL(const GURL& from, const GURL& to);
54 54
55 protected: 55 protected:
56 base::ThreadChecker thread_checker_; 56 base::SequenceChecker sequence_checker_;
57 57
58 private: 58 private:
59 DISALLOW_COPY_AND_ASSIGN(ImageStore); 59 DISALLOW_COPY_AND_ASSIGN(ImageStore);
60 }; 60 };
61 61
62 #endif // COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ 62 #endif // COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_
OLDNEW
« no previous file with comments | « no previous file | components/enhanced_bookmarks/image_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698