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

Side by Side Diff: sync/internal_api/events/commit_request_event.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/events/commit_request_event.h" 5 #include "sync/internal_api/public/events/commit_request_event.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 std::string CommitRequestEvent::GetDetails() const { 35 std::string CommitRequestEvent::GetDetails() const {
36 return base::StringPrintf( 36 return base::StringPrintf(
37 "Item count: %" PRIuS "\n" 37 "Item count: %" PRIuS "\n"
38 "Contributing types: %s", 38 "Contributing types: %s",
39 num_items_, 39 num_items_,
40 ModelTypeSetToString(contributing_types_).c_str()); 40 ModelTypeSetToString(contributing_types_).c_str());
41 } 41 }
42 42
43 scoped_ptr<base::DictionaryValue> CommitRequestEvent::GetProtoMessage() const { 43 std::unique_ptr<base::DictionaryValue> CommitRequestEvent::GetProtoMessage()
44 return scoped_ptr<base::DictionaryValue>( 44 const {
45 return std::unique_ptr<base::DictionaryValue>(
45 ClientToServerMessageToValue(request_, false)); 46 ClientToServerMessageToValue(request_, false));
46 } 47 }
47 48
48 scoped_ptr<ProtocolEvent> CommitRequestEvent::Clone() const { 49 std::unique_ptr<ProtocolEvent> CommitRequestEvent::Clone() const {
49 return scoped_ptr<ProtocolEvent>( 50 return std::unique_ptr<ProtocolEvent>(new CommitRequestEvent(
50 new CommitRequestEvent(timestamp_, 51 timestamp_, num_items_, contributing_types_, request_));
51 num_items_,
52 contributing_types_,
53 request_));
54 } 52 }
55 53
56 } // namespace syncer 54 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698