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

Unified Diff: components/dom_distiller/standalone/content_extractor.cc

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/fake_db.cc ('k') | components/leveldb_proto.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/dom_distiller/standalone/content_extractor.cc
diff --git a/components/dom_distiller/standalone/content_extractor.cc b/components/dom_distiller/standalone/content_extractor.cc
index 0b609ed21064ede18d7f9ff8b60b0605628fcf2d..7f7a216312a7be4160647d9dcd154c397d5f8420 100644
--- a/components/dom_distiller/standalone/content_extractor.cc
+++ b/components/dom_distiller/standalone/content_extractor.cc
@@ -12,13 +12,15 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "components/dom_distiller/content/distiller_page_web_contents.h"
+#include "components/dom_distiller/core/article_entry.h"
#include "components/dom_distiller/core/distiller.h"
-#include "components/dom_distiller/core/dom_distiller_database.h"
#include "components/dom_distiller/core/dom_distiller_service.h"
#include "components/dom_distiller/core/dom_distiller_store.h"
#include "components/dom_distiller/core/proto/distilled_article.pb.h"
#include "components/dom_distiller/core/proto/distilled_page.pb.h"
#include "components/dom_distiller/core/task_tracker.h"
+#include "components/leveldb_proto/proto_database.h"
+#include "components/leveldb_proto/proto_database_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/content_browser_test.h"
@@ -69,10 +71,11 @@ scoped_ptr<DomDistillerService> CreateDomDistillerService(
// TODO(cjhopman): use an in-memory database instead of an on-disk one with
// temporary directory.
- scoped_ptr<DomDistillerDatabase> db(
- new DomDistillerDatabase(background_task_runner));
+ scoped_ptr<leveldb_proto::ProtoDatabaseImpl<ArticleEntry> > db(
+ new leveldb_proto::ProtoDatabaseImpl<ArticleEntry>(
+ background_task_runner));
scoped_ptr<DomDistillerStore> dom_distiller_store(new DomDistillerStore(
- db.PassAs<DomDistillerDatabaseInterface>(), db_path));
+ db.PassAs<leveldb_proto::ProtoDatabase<ArticleEntry> >(), db_path));
scoped_ptr<DistillerPageFactory> distiller_page_factory(
new DistillerPageWebContentsFactory(context));
« no previous file with comments | « components/dom_distiller/core/fake_db.cc ('k') | components/leveldb_proto.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698