Replace the RepeatingTimer in ImageDecoder with a DelayTimer.
Review URL: https://codereview.chromium.org/1114003002
Cr-Commit-Position: refs/heads/master@{#327688}
diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h
index ca76043..d3bd4e7 100644
--- a/chrome/browser/image_decoder.h
+++ b/chrome/browser/image_decoder.h
@@ -141,11 +141,9 @@
// The UtilityProcessHost requests are sent to.
base::WeakPtr<content::UtilityProcessHost> utility_process_host_;
- // Calls StopBatchMode() after |kBatchModeTimeoutSeconds| have elapsed.
- base::RepeatingTimer<ImageDecoder> batch_mode_timer_;
-
- // The time Start() was last called.
- base::TimeTicks last_request_;
+ // Calls StopBatchMode() after |kBatchModeTimeoutSeconds| have elapsed,
+ // unless a new decoding request resets the timer.
+ scoped_ptr<base::DelayTimer<ImageDecoder>> batch_mode_timer_;
DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
};