Commit 5d2e0567 authored by Victor Costan's avatar Victor Costan Committed by Commit Bot

Android history reports: switch iterator to range-based for loop.

Change-Id: Ib37c918d0e96be88c51e5ce3a06f2d1e39ba3f75
Reviewed-on: https://chromium-review.googlesource.com/1100678Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567364}
parent 965aedb4
...@@ -109,10 +109,8 @@ void UsageReportsBufferBackend::Remove( ...@@ -109,10 +109,8 @@ void UsageReportsBufferBackend::Remove(
// TODO(haaawk): investigate if it's worth sorting the keys here to improve // TODO(haaawk): investigate if it's worth sorting the keys here to improve
// performance. // performance.
leveldb::WriteBatch updates; leveldb::WriteBatch updates;
for (std::vector<std::string>::const_iterator it = reports.begin(); for (const auto& report : reports) {
it != reports.end(); updates.Delete(leveldb::Slice(report));
++it) {
updates.Delete(leveldb::Slice(*it));
} }
leveldb::WriteOptions write_options; leveldb::WriteOptions write_options;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment