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

Side by Side Diff: sync/internal_api/events/commit_response_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_response_event.h" 5 #include "sync/internal_api/public/events/commit_response_event.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "sync/protocol/proto_value_conversions.h" 8 #include "sync/protocol/proto_value_conversions.h"
9 9
10 namespace syncer { 10 namespace syncer {
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 std::string CommitResponseEvent::GetType() const { 26 std::string CommitResponseEvent::GetType() const {
27 return "Commit Response"; 27 return "Commit Response";
28 } 28 }
29 29
30 std::string CommitResponseEvent::GetDetails() const { 30 std::string CommitResponseEvent::GetDetails() const {
31 return base::StringPrintf("Result: %s", GetSyncerErrorString(result_)); 31 return base::StringPrintf("Result: %s", GetSyncerErrorString(result_));
32 } 32 }
33 33
34 scoped_ptr<base::DictionaryValue> CommitResponseEvent::GetProtoMessage() const { 34 std::unique_ptr<base::DictionaryValue> CommitResponseEvent::GetProtoMessage()
35 return scoped_ptr<base::DictionaryValue>( 35 const {
36 return std::unique_ptr<base::DictionaryValue>(
36 ClientToServerResponseToValue(response_, false)); 37 ClientToServerResponseToValue(response_, false));
37 } 38 }
38 39
39 scoped_ptr<ProtocolEvent> CommitResponseEvent::Clone() const { 40 std::unique_ptr<ProtocolEvent> CommitResponseEvent::Clone() const {
40 return scoped_ptr<ProtocolEvent>( 41 return std::unique_ptr<ProtocolEvent>(
41 new CommitResponseEvent( 42 new CommitResponseEvent(timestamp_, result_, response_));
42 timestamp_,
43 result_,
44 response_));
45 } 43 }
46 44
47 } // namespace syncer 45 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698