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

Side by Side Diff: webrtc/libjingle/xmpp/rostermoduleimpl.h

Issue 1935893002: Replace scoped_ptr with unique_ptr in webrtc/libjingle/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « webrtc/libjingle/xmpp/rostermodule_unittest.cc ('k') | webrtc/libjingle/xmpp/xmppclient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_ 11 #ifndef WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_
12 #define WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_ 12 #define WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_
13 13
14 #include <memory>
15
14 #include "webrtc/libjingle/xmpp/moduleimpl.h" 16 #include "webrtc/libjingle/xmpp/moduleimpl.h"
15 #include "webrtc/libjingle/xmpp/rostermodule.h" 17 #include "webrtc/libjingle/xmpp/rostermodule.h"
16 18
17 namespace buzz { 19 namespace buzz {
18 20
19 //! Presence Information 21 //! Presence Information
20 //! This class stores both presence information for outgoing presence and is 22 //! This class stores both presence information for outgoing presence and is
21 //! returned by methods in XmppRosterModule to represent received incoming 23 //! returned by methods in XmppRosterModule to represent received incoming
22 //! presence information. When this class is writeable (non-const) then each 24 //! presence information. When this class is writeable (non-const) then each
23 //! update to any property will set the inner xml. Setting the raw_xml will 25 //! update to any property will set the inner xml. Setting the raw_xml will
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 private: 81 private:
80 XmppPresenceImpl(); 82 XmppPresenceImpl();
81 83
82 friend class XmppPresence; 84 friend class XmppPresence;
83 friend class XmppRosterModuleImpl; 85 friend class XmppRosterModuleImpl;
84 86
85 void CreateRawXmlSkeleton(); 87 void CreateRawXmlSkeleton();
86 88
87 // Store everything in the XML element. If this becomes a perf issue we can 89 // Store everything in the XML element. If this becomes a perf issue we can
88 // cache the data. 90 // cache the data.
89 rtc::scoped_ptr<XmlElement> raw_xml_; 91 std::unique_ptr<XmlElement> raw_xml_;
90 }; 92 };
91 93
92 //! A contact as given by the server 94 //! A contact as given by the server
93 class XmppRosterContactImpl : public XmppRosterContact { 95 class XmppRosterContactImpl : public XmppRosterContact {
94 public: 96 public:
95 virtual ~XmppRosterContactImpl() {} 97 virtual ~XmppRosterContactImpl() {}
96 98
97 //! The jid for the contact. 99 //! The jid for the contact.
98 //! Typically this will be a bare Jid. 100 //! Typically this will be a bare Jid.
99 virtual const Jid jid() const; 101 virtual const Jid jid() const;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 XmlElement** element, 146 XmlElement** element,
145 XmlChild** child_before); 147 XmlChild** child_before);
146 148
147 149
148 friend class XmppRosterContact; 150 friend class XmppRosterContact;
149 friend class XmppRosterModuleImpl; 151 friend class XmppRosterModuleImpl;
150 152
151 int group_count_; 153 int group_count_;
152 int group_index_returned_; 154 int group_index_returned_;
153 XmlElement * group_returned_; 155 XmlElement * group_returned_;
154 rtc::scoped_ptr<XmlElement> raw_xml_; 156 std::unique_ptr<XmlElement> raw_xml_;
155 }; 157 };
156 158
157 //! An XmppModule for handle roster and presence functionality 159 //! An XmppModule for handle roster and presence functionality
158 class XmppRosterModuleImpl : public XmppModuleImpl, 160 class XmppRosterModuleImpl : public XmppModuleImpl,
159 public XmppRosterModule, public XmppIqHandler { 161 public XmppRosterModule, public XmppIqHandler {
160 public: 162 public:
161 virtual ~XmppRosterModuleImpl(); 163 virtual ~XmppRosterModuleImpl();
162 164
163 IMPLEMENT_XMPPMODULE 165 IMPLEMENT_XMPPMODULE
164 166
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 void InternalIncomingPresence(const Jid& jid, const XmlElement* stanza); 268 void InternalIncomingPresence(const Jid& jid, const XmlElement* stanza);
267 void InternalIncomingPresenceError(const Jid& jid, const XmlElement* stanza); 269 void InternalIncomingPresenceError(const Jid& jid, const XmlElement* stanza);
268 void InternalRosterItems(const XmlElement* stanza); 270 void InternalRosterItems(const XmlElement* stanza);
269 271
270 // Member data 272 // Member data
271 XmppPresenceImpl outgoing_presence_; 273 XmppPresenceImpl outgoing_presence_;
272 XmppRosterHandler* roster_handler_; 274 XmppRosterHandler* roster_handler_;
273 275
274 typedef std::vector<XmppPresenceImpl*> PresenceVector; 276 typedef std::vector<XmppPresenceImpl*> PresenceVector;
275 typedef std::map<Jid, PresenceVector*> JidPresenceVectorMap; 277 typedef std::map<Jid, PresenceVector*> JidPresenceVectorMap;
276 rtc::scoped_ptr<JidPresenceVectorMap> incoming_presence_map_; 278 std::unique_ptr<JidPresenceVectorMap> incoming_presence_map_;
277 rtc::scoped_ptr<PresenceVector> incoming_presence_vector_; 279 std::unique_ptr<PresenceVector> incoming_presence_vector_;
278 280
279 typedef std::vector<XmppRosterContactImpl*> ContactVector; 281 typedef std::vector<XmppRosterContactImpl*> ContactVector;
280 rtc::scoped_ptr<ContactVector> contacts_; 282 std::unique_ptr<ContactVector> contacts_;
281 }; 283 };
282 284
283 } 285 }
284 286
285 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_ 287 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_
OLDNEW
« no previous file with comments | « webrtc/libjingle/xmpp/rostermodule_unittest.cc ('k') | webrtc/libjingle/xmpp/xmppclient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698