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

Unified Diff: components/sync/engine_impl/cycle/data_type_tracker.cc

Issue 2834073003: Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in chrome (Closed)
Patch Set: Replace unique_ptr.reset(other_unique_ptr.release()) with std::move() in chrome Created 3 years, 8 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
« no previous file with comments | « components/policy/core/common/cloud/external_policy_data_fetcher_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/cycle/data_type_tracker.cc
diff --git a/components/sync/engine_impl/cycle/data_type_tracker.cc b/components/sync/engine_impl/cycle/data_type_tracker.cc
index 247b3eb7e17cddc7d5034e647ec2dda8f4ff76ef..3adab32630165c619aa7268d03da15e56aa7e21f 100644
--- a/components/sync/engine_impl/cycle/data_type_tracker.cc
+++ b/components/sync/engine_impl/cycle/data_type_tracker.cc
@@ -5,6 +5,7 @@
#include "components/sync/engine_impl/cycle/data_type_tracker.h"
#include <algorithm>
+#include <utility>
#include "base/logging.h"
#include "base/memory/ptr_util.h"
@@ -108,7 +109,7 @@ void DataTypeTracker::RecordRemoteInvalidation(
// The incoming invalidation may have caused us to exceed our buffer size.
// Trim some items from our list, if necessary.
while (pending_invalidations_.size() > payload_buffer_size_) {
- last_dropped_invalidation_.reset(pending_invalidations_.front().release());
+ last_dropped_invalidation_ = std::move(pending_invalidations_.front());
last_dropped_invalidation_->Drop();
pending_invalidations_.erase(pending_invalidations_.begin());
}
« no previous file with comments | « components/policy/core/common/cloud/external_policy_data_fetcher_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698