Index: chrome/browser/prefs/pref_hash_filter_unittest.cc |
diff --git a/chrome/browser/prefs/pref_hash_filter_unittest.cc b/chrome/browser/prefs/pref_hash_filter_unittest.cc |
index ea63a88ee718d0b2e9757ad6ab334af7cb305ede..452e424f660137394bfadf467656ff820bd78b78 100644 |
--- a/chrome/browser/prefs/pref_hash_filter_unittest.cc |
+++ b/chrome/browser/prefs/pref_hash_filter_unittest.cc |
@@ -12,6 +12,7 @@ |
#include "base/basictypes.h" |
#include "base/bind.h" |
+#include "base/bind_helpers.h" |
#include "base/callback_forward.h" |
#include "base/compiler_specific.h" |
#include "base/logging.h" |
@@ -140,6 +141,8 @@ class MockPrefHashStore : public PrefHashStore { |
// PrefHashStore implementation. |
virtual scoped_ptr<PrefHashStoreTransaction> BeginTransaction() OVERRIDE; |
+ virtual bool IsInitialized() const OVERRIDE; |
+ virtual void Reset() OVERRIDE; |
virtual void CommitPendingWrite() OVERRIDE; |
private: |
@@ -169,6 +172,11 @@ class MockPrefHashStore : public PrefHashStore { |
virtual void StoreSplitHash( |
const std::string& path, |
const base::DictionaryValue* split_value) OVERRIDE; |
+ virtual const base::Value* GetHash(const std::string& path) const OVERRIDE; |
+ virtual void ImportHash(const std::string& path, |
+ const base::Value* hash) OVERRIDE; |
+ virtual void ClearHash(const std::string& path) OVERRIDE; |
+ virtual bool StampSuperMac() OVERRIDE; |
private: |
MockPrefHashStore* outer_; |
@@ -235,6 +243,15 @@ scoped_ptr<PrefHashStoreTransaction> MockPrefHashStore::BeginTransaction() { |
new MockPrefHashStoreTransaction(this)); |
} |
+bool MockPrefHashStore::IsInitialized() const { |
+ NOTIMPLEMENTED(); |
+ return true; |
+} |
+ |
+void MockPrefHashStore::Reset() { |
+ NOTIMPLEMENTED(); |
+} |
+ |
void MockPrefHashStore::CommitPendingWrite() { |
EXPECT_FALSE(commit_performed_); |
commit_performed_ = true; |
@@ -304,6 +321,28 @@ void MockPrefHashStore::MockPrefHashStoreTransaction::StoreSplitHash( |
PrefHashFilter::TRACKING_STRATEGY_SPLIT); |
} |
+const base::Value* MockPrefHashStore::MockPrefHashStoreTransaction::GetHash( |
+ const std::string& path) const { |
+ NOTIMPLEMENTED(); |
+ return NULL; |
+} |
+ |
+void MockPrefHashStore::MockPrefHashStoreTransaction::ImportHash( |
+ const std::string& path, |
+ const base::Value* hash) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+void MockPrefHashStore::MockPrefHashStoreTransaction::ClearHash( |
+ const std::string& path) { |
+ NOTIMPLEMENTED(); |
+} |
+ |
+bool MockPrefHashStore::MockPrefHashStoreTransaction::StampSuperMac() { |
+ NOTIMPLEMENTED(); |
+ return false; |
+} |
+ |
std::vector<PrefHashFilter::TrackedPreferenceMetadata> GetConfiguration( |
PrefHashFilter::EnforcementLevel max_enforcement_level) { |
std::vector<PrefHashFilter::TrackedPreferenceMetadata> configuration( |
@@ -358,7 +397,7 @@ class PrefHashFilterTest |
pref_hash_filter_->FilterOnLoad( |
base::Bind(&PrefHashFilterTest::GetPrefsBack, base::Unretained(this), |
expect_prefs_modifications), |
- pref_store_contents_.Pass()); |
+ pref_store_contents_.get()); |
} |
MockPrefHashStore* mock_pref_hash_store_; |
@@ -368,13 +407,9 @@ class PrefHashFilterTest |
scoped_ptr<PrefHashFilter> pref_hash_filter_; |
private: |
- // Stores |prefs| back in |pref_store_contents| and ensure |
- // |expected_schedule_write| matches the reported |schedule_write|. |
+ // Ensures |expected_schedule_write| matches the reported |schedule_write|. |
void GetPrefsBack(bool expected_schedule_write, |
- scoped_ptr<base::DictionaryValue> prefs, |
bool schedule_write) { |
- pref_store_contents_ = prefs.Pass(); |
- EXPECT_TRUE(pref_store_contents_); |
EXPECT_EQ(expected_schedule_write, schedule_write); |
} |