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

Unified Diff: sync/engine/syncer.cc

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix conflicts Created 4 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 | « sync/engine/sync_scheduler_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer.cc
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index fb6c466054297acb1822add39fc1eadad0e1152c..eddfb491e4f47ef9ca5533e3152d65d03db510d1 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -4,6 +4,8 @@
#include "sync/engine/syncer.h"
+#include <memory>
+
#include "base/auto_reset.h"
#include "base/location.h"
#include "base/logging.h"
@@ -177,16 +179,13 @@ SyncerError Syncer::BuildAndPostCommits(ModelTypeSet requested_types,
// errors from the ServerConnectionManager if an exist has been requested.
// However, it doesn't hurt to check it anyway.
while (!ExitRequested()) {
- scoped_ptr<Commit> commit(
- Commit::Init(
- requested_types,
- session->context()->GetEnabledTypes(),
- session->context()->max_commit_batch_size(),
- session->context()->account_name(),
- session->context()->directory()->cache_guid(),
- session->context()->cookie_jar_mismatch(),
- commit_processor,
- session->context()->extensions_activity()));
+ std::unique_ptr<Commit> commit(Commit::Init(
+ requested_types, session->context()->GetEnabledTypes(),
+ session->context()->max_commit_batch_size(),
+ session->context()->account_name(),
+ session->context()->directory()->cache_guid(),
+ session->context()->cookie_jar_mismatch(), commit_processor,
+ session->context()->extensions_activity()));
if (!commit) {
break;
}
« no previous file with comments | « sync/engine/sync_scheduler_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698