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

Unified Diff: components/dom_distiller/core/fake_db.h

Issue 330833002: Extract protobuf database into a new 'leveldb_proto' component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 6 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
« no previous file with comments | « components/dom_distiller/core/dom_distiller_test_util.cc ('k') | components/dom_distiller/core/fake_db.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/core/fake_db.h
diff --git a/components/dom_distiller/core/fake_db.h b/components/dom_distiller/core/fake_db.h
deleted file mode 100644
index 8d03d982d828f4a30ab3f79faf8196c9c225aff5..0000000000000000000000000000000000000000
--- a/components/dom_distiller/core/fake_db.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_DOM_DISTILLER_CORE_FAKE_DB_H_
-#define COMPONENTS_DOM_DISTILLER_CORE_FAKE_DB_H_
-
-#include <string>
-
-#include "components/dom_distiller/core/dom_distiller_database.h"
-
-namespace dom_distiller {
-namespace test {
-
-class FakeDB : public DomDistillerDatabaseInterface {
- typedef base::Callback<void(bool)> Callback;
-
- public:
- typedef base::hash_map<std::string, ArticleEntry> EntryMap;
-
- explicit FakeDB(EntryMap* db);
- virtual ~FakeDB();
-
- virtual void Init(const base::FilePath& database_dir,
- DomDistillerDatabaseInterface::InitCallback callback)
- OVERRIDE;
-
- virtual void UpdateEntries(
- scoped_ptr<EntryVector> entries_to_save,
- scoped_ptr<EntryVector> entries_to_remove,
- DomDistillerDatabaseInterface::UpdateCallback callback) OVERRIDE;
-
- virtual void LoadEntries(DomDistillerDatabaseInterface::LoadCallback callback)
- OVERRIDE;
- base::FilePath& GetDirectory();
-
- void InitCallback(bool success);
-
- void LoadCallback(bool success);
-
- void UpdateCallback(bool success);
-
- static base::FilePath DirectoryForTestDB();
-
- private:
- static void RunLoadCallback(
- DomDistillerDatabaseInterface::LoadCallback callback,
- scoped_ptr<EntryVector> entries,
- bool success);
-
- base::FilePath dir_;
- EntryMap* db_;
-
- Callback init_callback_;
- Callback load_callback_;
- Callback update_callback_;
-};
-
-} // namespace test
-} // namespace dom_distiller
-
-#endif // COMPONENTS_DOM_DISTILLER_CORE_FAKE_DB_H_
« no previous file with comments | « components/dom_distiller/core/dom_distiller_test_util.cc ('k') | components/dom_distiller/core/fake_db.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698