| 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 dd694959a9cb9bb570278b7642ee9449f16143b3..e851a711e75c95a2a25941d52c1ca78dfd84cea6 100644
|
| --- a/components/dom_distiller/standalone/content_extractor.cc
|
| +++ b/components/dom_distiller/standalone/content_extractor.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/message_loop/message_loop.h"
|
| #include "base/path_service.h"
|
| #include "base/run_loop.h"
|
| +#include "base/strings/string_number_conversions.h"
|
| #include "components/dom_distiller/content/distiller_page_web_contents.h"
|
| #include "components/dom_distiller/core/distiller.h"
|
| #include "components/dom_distiller/core/dom_distiller_database.h"
|
| @@ -44,8 +45,12 @@ const char* kOutputFile = "output-file";
|
| // output.
|
| const char* kShouldOutputBinary = "output-binary";
|
|
|
| +// Indicates to output only the text of the article and not the enclosing html.
|
| const char* kExtractTextOnly = "extract-text-only";
|
|
|
| +// Indicates to include debug output.
|
| +const char* kDebugLevel = "debug-level";
|
| +
|
| scoped_ptr<DomDistillerService> CreateDomDistillerService(
|
| content::BrowserContext* context,
|
| const base::FilePath& db_path) {
|
| @@ -69,6 +74,14 @@ scoped_ptr<DomDistillerService> CreateDomDistillerService(
|
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(kExtractTextOnly)) {
|
| options.set_extract_text_only(true);
|
| }
|
| + int debug_level = 0;
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(kDebugLevel) &&
|
| + base::StringToInt(
|
| + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
|
| + kDebugLevel),
|
| + &debug_level)) {
|
| + options.set_debug_level(debug_level);
|
| + }
|
| scoped_ptr<DistillerFactory> distiller_factory(
|
| new DistillerFactoryImpl(distiller_url_fetcher_factory.Pass(), options));
|
|
|
|
|