summaryrefslogtreecommitdiffstats
path: root/chromium/components/dom_distiller/core/fake_db.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/dom_distiller/core/fake_db.h')
-rw-r--r--chromium/components/dom_distiller/core/fake_db.h60
1 files changed, 0 insertions, 60 deletions
diff --git a/chromium/components/dom_distiller/core/fake_db.h b/chromium/components/dom_distiller/core/fake_db.h
deleted file mode 100644
index 8b7e9c7a564..00000000000
--- a/chromium/components/dom_distiller/core/fake_db.h
+++ /dev/null
@@ -1,60 +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 "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_