Index: chrome/browser/history/in_memory_url_index_types.h |
=================================================================== |
--- chrome/browser/history/in_memory_url_index_types.h (revision 152962) |
+++ chrome/browser/history/in_memory_url_index_types.h (working copy) |
@@ -117,7 +117,6 @@ |
// A map from character to the word_ids of words containing that character. |
typedef std::set<WordID> WordIDSet; // An index into the WordList. |
-// TODO(mrossetti): Consider using <multimap>. See http://crbug.com/138334 |
typedef std::map<char16, WordIDSet> CharWordIDMap; |
// A map from word (by word_id) to history items containing that word. |
@@ -143,6 +142,24 @@ |
}; |
typedef std::map<HistoryID, RowWordStarts> WordStartsMap; |
+// A RefCountedThreadSafe class that manages a bool used for passing around |
+// success when saving the persistent data for the InMemoryURLIndex in a cache. |
+class RefCountedBool : public base::RefCountedThreadSafe<RefCountedBool> { |
+ public: |
+ explicit RefCountedBool(bool value) : value_(value) {} |
+ |
+ bool value() const { return value_; } |
+ void set_value(bool value) { value_ = value; } |
+ |
+ private: |
+ friend class base::RefCountedThreadSafe<RefCountedBool>; |
+ virtual ~RefCountedBool(); |
+ |
+ bool value_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(RefCountedBool); |
+}; |
+ |
} // namespace history |
#endif // CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_TYPES_H_ |