Chromium Code Reviews| 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 3842d088fd7a0ddc736a6fa6fdce0583c48505db..5c2633a04faf4f3707adcbadf775fa970835fd0c 100644 |
| --- a/components/dom_distiller/standalone/content_extractor.cc |
| +++ b/components/dom_distiller/standalone/content_extractor.cc |
| @@ -225,7 +225,7 @@ class ContentExtractionRequest : public ViewRequestDelegate { |
| } |
| static ScopedVector<ContentExtractionRequest> CreateForCommandLine( |
| - const CommandLine& command_line, |
| + const base::CommandLine& command_line, |
| UrlToDomainMap* url_to_domain_map) { |
| ScopedVector<ContentExtractionRequest> requests; |
| if (command_line.HasSwitch(kUrlSwitch)) { |
| @@ -304,7 +304,7 @@ class ContentExtractor : public ContentBrowserTest { |
| // Change behavior of the default host resolver to avoid DNS lookup errors, so |
| // we can make network calls. |
| void SetUpOnMainThread() override { |
| - if (!CommandLine::ForCurrentProcess()->HasSwitch(kDisableDnsSwitch)) { |
| + if (!base::CommandLine::ForCurrentProcess()->HasSwitch(kDisableDnsSwitch)) { |
| EnableDNSLookupForThisTest(); |
| } |
| CHECK(db_dir_.CreateUniqueTempDir()); |
| @@ -317,7 +317,8 @@ class ContentExtractor : public ContentBrowserTest { |
| // Creates the DomDistillerService and creates and starts the extraction |
| // request. |
| void Start() { |
| - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| + const base::CommandLine& command_line = |
| + *base::CommandLine::ForCurrentProcess(); |
| UrlToDomainMap url_to_domain_map; |
| requests_ = ContentExtractionRequest::CreateForCommandLine( |
| command_line, &url_to_domain_map); |
| @@ -367,18 +368,20 @@ class ContentExtractor : public ContentBrowserTest { |
| } |
| void DoArticleOutput() { |
| + const base::CommandLine& command_line = |
| + *base::CommandLine::ForCurrentProcess(); |
|
bengr
2014/12/02 16:17:32
Indent two more.
|
| for (size_t i = 0; i < requests_.size(); ++i) { |
| const DistilledArticleProto& article = requests_[i]->GetArticleCopy(); |
| - if (CommandLine::ForCurrentProcess()->HasSwitch(kShouldOutputBinary)) { |
| + if (command_line.HasSwitch(kShouldOutputBinary)) { |
| WriteProtobufWithSize(article, protobuf_output_stream_.get()); |
| } else { |
| output_data_ += GetReadableArticleString(article) + "\n"; |
| } |
| } |
| - if (CommandLine::ForCurrentProcess()->HasSwitch(kOutputFile)) { |
| + if (command_line.HasSwitch(kOutputFile)) { |
| base::FilePath filename = |
| - CommandLine::ForCurrentProcess()->GetSwitchValuePath(kOutputFile); |
| + command_line.GetSwitchValuePath(kOutputFile); |
|
bengr
2014/12/02 16:17:32
This should fit on the previous line now.
|
| ASSERT_EQ( |
| (int)output_data_.size(), |
| base::WriteFile(filename, output_data_.c_str(), output_data_.size())); |