Index: chrome/browser/history/in_memory_url_index_types.h |
=================================================================== |
--- chrome/browser/history/in_memory_url_index_types.h (revision 125451) |
+++ chrome/browser/history/in_memory_url_index_types.h (working copy) |
@@ -10,6 +10,7 @@ |
#include <set> |
#include <vector> |
+#include "base/memory/ref_counted.h" |
#include "base/string16.h" |
#include "chrome/browser/history/history_types.h" |
#include "chrome/browser/autocomplete/history_provider_util.h" |
@@ -74,6 +75,29 @@ |
}; |
typedef std::vector<ScoredHistoryMatch> ScoredHistoryMatches; |
+// RefCountedBool -------------------------------------------------------------- |
+ |
+// An implementation of RefCountedMemory that manages a bool that we use for |
+// passing around success when saving our cache. |
+class RefCountedBool : public RefCountedMemory { |
brettw
2012/03/12 04:37:40
IT wasn't the intent for all random types to go in
mrossetti
2012/03/13 22:25:46
This class is used to exchange status between the
|
+ public: |
+ explicit RefCountedBool(bool value) : bool_(value) {} |
+ |
+ virtual const unsigned char* front() const OVERRIDE; |
brettw
2012/03/12 04:37:40
Delete these.
mrossetti
2012/03/13 22:25:46
Done.
|
+ virtual size_t size() const OVERRIDE; |
+ |
+ bool value() { return bool_; } |
brettw
2012/03/12 04:37:40
This should be const.
mrossetti
2012/03/13 22:25:46
Done.
|
+ void set_value(bool value) { bool_ = value; } |
+ |
+ private: |
+ friend class base::RefCountedThreadSafe<RefCountedBool>; |
+ virtual ~RefCountedBool(); |
+ |
+ bool bool_; |
brettw
2012/03/12 04:37:40
This should be called "value_" to match the getter
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(RefCountedBool); |
+}; |
+ |
// Convenience Types ----------------------------------------------------------- |
typedef std::vector<string16> String16Vector; |