Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: chrome/browser/value_store/testing_value_store.h

Issue 24021002: Propagate more information about ValueStore errors to callers, notably an (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add Pass*() Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/value_store/testing_value_store.h
diff --git a/chrome/browser/value_store/testing_value_store.h b/chrome/browser/value_store/testing_value_store.h
index c28ea5f065eecebb834a2b82a36faa0baa9b4960..f0be2b94dd1946fe3374dee141877463b173c093 100644
--- a/chrome/browser/value_store/testing_value_store.h
+++ b/chrome/browser/value_store/testing_value_store.h
@@ -15,8 +15,9 @@ class TestingValueStore : public ValueStore {
TestingValueStore();
virtual ~TestingValueStore();
- // Sets whether to fail all requests (default is false).
- void SetFailAllRequests(bool fail_all_requests);
+ // Sets the error code for requests. If OK, errors won't be thrown.
+ // Defaults to OK.
+ void set_error_code(ErrorCode error_code) { error_code_ = error_code; }
// Accessors for the number of reads/writes done by this value store. Each
// Get* operation (except for the BytesInUse ones) counts as one read, and
@@ -44,10 +45,12 @@ class TestingValueStore : public ValueStore {
virtual WriteResult Clear() OVERRIDE;
private:
+ scoped_ptr<ValueStore::Error> TestingError();
+
DictionaryValue storage_;
int read_count_;
int write_count_;
- bool fail_all_requests_;
+ ErrorCode error_code_;
DISALLOW_COPY_AND_ASSIGN(TestingValueStore);
};
« no previous file with comments | « chrome/browser/value_store/leveldb_value_store.cc ('k') | chrome/browser/value_store/testing_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698