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

Side by Side Diff: remoting/host/register_support_host_request.h

Issue 9720019: Use scoped_ptr<> to pass ownership in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/log_to_server.cc ('k') | remoting/host/screen_recorder.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 // 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 #ifndef REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_ 5 #ifndef REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_
6 #define REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_ 6 #define REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 23 matching lines...) Expand all
34 // connected. When a response is received from the bot, it calls the 34 // connected. When a response is received from the bot, it calls the
35 // callback specified in the Init() method. 35 // callback specified in the Init() method.
36 class RegisterSupportHostRequest : public SignalStrategy::Listener { 36 class RegisterSupportHostRequest : public SignalStrategy::Listener {
37 public: 37 public:
38 // First parameter is set to true on success. Second parameter is 38 // First parameter is set to true on success. Second parameter is
39 // the new SessionID received from the bot. Third parameter is the 39 // the new SessionID received from the bot. Third parameter is the
40 // amount of time until that id expires. 40 // amount of time until that id expires.
41 typedef base::Callback<void(bool, const std::string&, 41 typedef base::Callback<void(bool, const std::string&,
42 const base::TimeDelta&)> RegisterCallback; 42 const base::TimeDelta&)> RegisterCallback;
43 43
44 // Doesn't take ownership of |signal_strategy| or |key_pair|. Both
45 // |signal_strategy| and |key_pair| must outlive this 44 // |signal_strategy| and |key_pair| must outlive this
46 // object. |callback| is called when registration response is 45 // object. |callback| is called when registration response is
47 // received from the server. Callback is never called if the bot 46 // received from the server. Callback is never called if the bot
48 // malfunctions and doesn't respond to the request. 47 // malfunctions and doesn't respond to the request.
49 // 48 //
50 // TODO(sergeyu): This class should have timeout for the bot 49 // TODO(sergeyu): This class should have timeout for the bot
51 // response. 50 // response.
52 RegisterSupportHostRequest(SignalStrategy* signal_strategy, 51 RegisterSupportHostRequest(SignalStrategy* signal_strategy,
53 HostKeyPair* key_pair, 52 HostKeyPair* key_pair,
54 const RegisterCallback& callback); 53 const RegisterCallback& callback);
(...skipping 25 matching lines...) Expand all
80 79
81 scoped_ptr<IqSender> iq_sender_; 80 scoped_ptr<IqSender> iq_sender_;
82 scoped_ptr<IqRequest> request_; 81 scoped_ptr<IqRequest> request_;
83 82
84 DISALLOW_COPY_AND_ASSIGN(RegisterSupportHostRequest); 83 DISALLOW_COPY_AND_ASSIGN(RegisterSupportHostRequest);
85 }; 84 };
86 85
87 } // namespace remoting 86 } // namespace remoting
88 87
89 #endif // REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_ 88 #endif // REMOTING_HOST_REGISTER_SUPPORT_HOST_REQUEST_H_
OLDNEW
« no previous file with comments | « remoting/host/log_to_server.cc ('k') | remoting/host/screen_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698