Chromium Code Reviews| Index: chrome/browser/value_store/value_store_frontend.cc |
| diff --git a/chrome/browser/value_store/value_store_frontend.cc b/chrome/browser/value_store/value_store_frontend.cc |
| index 91d14624642e1b6218b2c3623b8322d90e557561..ca0a7cf9a8197f8ba83b2a06c04f6230966bb422 100644 |
| --- a/chrome/browser/value_store/value_store_frontend.cc |
| +++ b/chrome/browser/value_store/value_store_frontend.cc |
| @@ -4,6 +4,7 @@ |
| #include "chrome/browser/value_store/value_store_frontend.h" |
| +#include "chrome/browser/value_store/failing_value_store.h" |
| #include "chrome/browser/value_store/leveldb_value_store.h" |
| #include "content/public/browser/browser_thread.h" |
| @@ -61,6 +62,8 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
| DCHECK(!storage_); |
| storage_ = LeveldbValueStore::Create(db_path); |
| + if (!storage_) |
| + storage_ = new FailingValueStore(); |
|
Matt Perry
2012/06/12 00:15:57
This is the main difference.
I also renamed Faili
|
| } |
| void RunCallback(const ValueStoreFrontend::ReadCallback& callback, |
| @@ -71,7 +74,7 @@ class ValueStoreFrontend::Backend : public base::RefCountedThreadSafe<Backend> { |
| // The actual ValueStore that handles persisting the data to disk. Used |
| // exclusively on the FILE thread. |
| - LeveldbValueStore* storage_; |
| + ValueStore* storage_; |
| DISALLOW_COPY_AND_ASSIGN(Backend); |
| }; |