Skip to content

Commit

Permalink
blink: removes some dead code
Browse files Browse the repository at this point in the history
This code is not used, so removing.

BUG=none
TEST=none

Change-Id: I7559545706300104b1d86f24f5eea475b72f9b1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3810626
Commit-Queue: Scott Violet <sky@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1032233}
  • Loading branch information
Scott Violet authored and Chromium LUCI CQ committed Aug 6, 2022
1 parent 258c2cc commit 74e19d9
Showing 1 changed file with 0 additions and 26 deletions.
Expand Up @@ -454,32 +454,6 @@ static HTMLTokenizer::State TokenizerStateForContextElement(
return HTMLTokenizer::kDataState;
}

class ScopedYieldTimer {
public:
// This object is created at the start of a block of parsing, and will
// report the time since the last block yielded if known.
ScopedYieldTimer(std::unique_ptr<base::ElapsedTimer>* timer,
HTMLParserMetrics* metrics_reporter)
: timer_(timer), reporting_metrics_(metrics_reporter) {
if (!reporting_metrics_ || !(*timer_))
return;

metrics_reporter->AddYieldInterval((*timer_)->Elapsed());
timer_->reset();
}

// The destructor creates a new timer, which will keep track of time until
// the next block starts.
~ScopedYieldTimer() {
if (reporting_metrics_)
*timer_ = std::make_unique<base::ElapsedTimer>();
}

private:
std::unique_ptr<base::ElapsedTimer>* timer_;
bool reporting_metrics_;
};

HTMLDocumentParser::HTMLDocumentParser(HTMLDocument& document,
ParserSynchronizationPolicy sync_policy,
ParserPrefetchPolicy prefetch_policy)
Expand Down

0 comments on commit 74e19d9

Please sign in to comment.