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

Side by Side Diff: sync/internal_api/events/normal_get_updates_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/normal_get_updates_request_event.h" 5 #include "sync/internal_api/public/events/normal_get_updates_request_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 #include "sync/sessions/nudge_tracker.h" 9 #include "sync/sessions/nudge_tracker.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 if (is_retry_) { 61 if (is_retry_) {
62 if (!details.empty()) 62 if (!details.empty())
63 details.append("\n"); 63 details.append("\n");
64 details.append(base::StringPrintf("Is retry: True")); 64 details.append(base::StringPrintf("Is retry: True"));
65 } 65 }
66 66
67 return details; 67 return details;
68 } 68 }
69 69
70 scoped_ptr<base::DictionaryValue> 70 std::unique_ptr<base::DictionaryValue>
71 NormalGetUpdatesRequestEvent::GetProtoMessage() const { 71 NormalGetUpdatesRequestEvent::GetProtoMessage() const {
72 return scoped_ptr<base::DictionaryValue>( 72 return std::unique_ptr<base::DictionaryValue>(
73 ClientToServerMessageToValue(request_, false)); 73 ClientToServerMessageToValue(request_, false));
74 } 74 }
75 75
76 scoped_ptr<ProtocolEvent> NormalGetUpdatesRequestEvent::Clone() const { 76 std::unique_ptr<ProtocolEvent> NormalGetUpdatesRequestEvent::Clone() const {
77 return scoped_ptr<ProtocolEvent>( 77 return std::unique_ptr<ProtocolEvent>(new NormalGetUpdatesRequestEvent(
78 new NormalGetUpdatesRequestEvent( 78 timestamp_, nudged_types_, notified_types_, refresh_requested_types_,
79 timestamp_, 79 is_retry_, request_));
80 nudged_types_,
81 notified_types_,
82 refresh_requested_types_,
83 is_retry_,
84 request_));
85 } 80 }
86 81
87 NormalGetUpdatesRequestEvent::NormalGetUpdatesRequestEvent( 82 NormalGetUpdatesRequestEvent::NormalGetUpdatesRequestEvent(
88 base::Time timestamp, 83 base::Time timestamp,
89 ModelTypeSet nudged_types, 84 ModelTypeSet nudged_types,
90 ModelTypeSet notified_types, 85 ModelTypeSet notified_types,
91 ModelTypeSet refresh_requested_types, 86 ModelTypeSet refresh_requested_types,
92 bool is_retry, 87 bool is_retry,
93 sync_pb::ClientToServerMessage request) 88 sync_pb::ClientToServerMessage request)
94 : timestamp_(timestamp), 89 : timestamp_(timestamp),
95 nudged_types_(nudged_types), 90 nudged_types_(nudged_types),
96 notified_types_(notified_types), 91 notified_types_(notified_types),
97 refresh_requested_types_(refresh_requested_types), 92 refresh_requested_types_(refresh_requested_types),
98 is_retry_(is_retry), 93 is_retry_(is_retry),
99 request_(request) {} 94 request_(request) {}
100 95
101 } // namespace syncer 96 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698