Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3705)

Unified Diff: chrome/browser/sync_file_system/task_logger.cc

Issue 2314833002: Remove some uses of stl_util's STLDeleteContainerPointers. (Closed)
Patch Set: cleanup Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync_file_system/task_logger.cc
diff --git a/chrome/browser/sync_file_system/task_logger.cc b/chrome/browser/sync_file_system/task_logger.cc
index fcfa16d49c4b36c3d873774032b5b3fd9a1ad8c8..dfe7753a94bdff5b5f528851e84e35d9688dec52 100644
--- a/chrome/browser/sync_file_system/task_logger.cc
+++ b/chrome/browser/sync_file_system/task_logger.cc
@@ -7,7 +7,6 @@
#include <stddef.h>
#include "base/lazy_instance.h"
-#include "base/stl_util.h"
#include "base/synchronization/lock.h"
namespace sync_file_system {
@@ -42,18 +41,16 @@ void TaskLogger::RecordLog(std::unique_ptr<TaskLog> log) {
return;
if (log_history_.size() >= kMaxLogSize) {
- delete log_history_.front();
log_history_.pop_front();
}
- log_history_.push_back(log.release());
+ log_history_.push_back(std::move(log));
FOR_EACH_OBSERVER(Observer, observers_,
OnLogRecorded(*log_history_.back()));
}
void TaskLogger::ClearLog() {
- base::STLDeleteContainerPointers(log_history_.begin(), log_history_.end());
log_history_.clear();
}
« no previous file with comments | « chrome/browser/sync_file_system/task_logger.h ('k') | components/certificate_transparency/log_proof_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698