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

Side by Side Diff: sync/internal_api/public/engine/model_safe_worker.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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/internal_api/public/engine/model_safe_worker.h" 5 #include "sync/internal_api/public/engine/model_safe_worker.h"
6 6
7 #include <memory>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 12
12 namespace syncer { 13 namespace syncer {
13 14
14 scoped_ptr<base::DictionaryValue> ModelSafeRoutingInfoToValue( 15 std::unique_ptr<base::DictionaryValue> ModelSafeRoutingInfoToValue(
15 const ModelSafeRoutingInfo& routing_info) { 16 const ModelSafeRoutingInfo& routing_info) {
16 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 17 std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
17 for (ModelSafeRoutingInfo::const_iterator it = routing_info.begin(); 18 for (ModelSafeRoutingInfo::const_iterator it = routing_info.begin();
18 it != routing_info.end(); ++it) { 19 it != routing_info.end(); ++it) {
19 dict->SetString(ModelTypeToString(it->first), 20 dict->SetString(ModelTypeToString(it->first),
20 ModelSafeGroupToString(it->second)); 21 ModelSafeGroupToString(it->second));
21 } 22 }
22 return dict; 23 return dict;
23 } 24 }
24 25
25 std::string ModelSafeRoutingInfoToString( 26 std::string ModelSafeRoutingInfoToString(
26 const ModelSafeRoutingInfo& routing_info) { 27 const ModelSafeRoutingInfo& routing_info) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return; 192 return;
192 DCHECK_EQ(base::MessageLoop::current(), working_loop_); 193 DCHECK_EQ(base::MessageLoop::current(), working_loop_);
193 } 194 }
194 195
195 DCHECK(stopped_); 196 DCHECK(stopped_);
196 base::MessageLoop::current()->RemoveDestructionObserver(this); 197 base::MessageLoop::current()->RemoveDestructionObserver(this);
197 unregister_done_callback.Run(GetModelSafeGroup()); 198 unregister_done_callback.Run(GetModelSafeGroup());
198 } 199 }
199 200
200 } // namespace syncer 201 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698