| Index: chrome/browser/history/in_memory_url_index_types.h
|
| ===================================================================
|
| --- chrome/browser/history/in_memory_url_index_types.h (revision 125078)
|
| +++ 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 {
|
| + public:
|
| + explicit RefCountedBool(bool value) : bool_(value) {}
|
| +
|
| + virtual const unsigned char* front() const OVERRIDE;
|
| + virtual size_t size() const OVERRIDE;
|
| +
|
| + bool value() { return bool_; }
|
| + void set_value(bool value) { bool_ = value; }
|
| +
|
| + private:
|
| + friend class base::RefCountedThreadSafe<RefCountedBool>;
|
| + virtual ~RefCountedBool();
|
| +
|
| + bool bool_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(RefCountedBool);
|
| +};
|
| +
|
| // Convenience Types -----------------------------------------------------------
|
|
|
| typedef std::vector<string16> String16Vector;
|
|
|