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

Side by Side Diff: remoting/client/jni/chromoting_jni_instance.h

Issue 2001813002: Invalidate ChromotingJniInstance's WeakPtr on network thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | « no previous file | remoting/client/jni/chromoting_jni_instance.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_CLIENT_CHROMOTING_JNI_INSTANCE_H_ 5 #ifndef REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_
6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_ 6 #define REMOTING_CLIENT_CHROMOTING_JNI_INSTANCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const std::string& auth_token, 48 const std::string& auth_token,
49 const std::string& host_jid, 49 const std::string& host_jid,
50 const std::string& host_id, 50 const std::string& host_id,
51 const std::string& host_pubkey, 51 const std::string& host_pubkey,
52 const std::string& pairing_id, 52 const std::string& pairing_id,
53 const std::string& pairing_secret, 53 const std::string& pairing_secret,
54 const std::string& capabilities, 54 const std::string& capabilities,
55 const std::string& flags); 55 const std::string& flags);
56 56
57 // Terminates the current connection (if it hasn't already failed) and cleans 57 // Terminates the current connection (if it hasn't already failed) and cleans
58 // up. Must be called before destruction. 58 // up. The instance will no longer be valid after calling this function.
59 // Must be called before destruction.
59 void Disconnect(); 60 void Disconnect();
60 61
61 // Requests the android app to fetch a third-party token. 62 // Requests the android app to fetch a third-party token.
62 void FetchThirdPartyToken( 63 void FetchThirdPartyToken(
63 const std::string& host_public_key, 64 const std::string& host_public_key,
64 const std::string& token_url, 65 const std::string& token_url,
65 const std::string& scope, 66 const std::string& scope,
66 const protocol::ThirdPartyTokenFetchedCallback& token_fetched_callback); 67 const protocol::ThirdPartyTokenFetchedCallback& token_fetched_callback);
67 68
68 // Called by the android app when the token is fetched. 69 // Called by the android app when the token is fetched.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 friend class base::RefCountedThreadSafe<ChromotingJniInstance>; 195 friend class base::RefCountedThreadSafe<ChromotingJniInstance>;
195 196
196 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_; 197 base::WeakPtrFactory<ChromotingJniInstance> weak_factory_;
197 198
198 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance); 199 DISALLOW_COPY_AND_ASSIGN(ChromotingJniInstance);
199 }; 200 };
200 201
201 } // namespace remoting 202 } // namespace remoting
202 203
203 #endif 204 #endif
OLDNEW
« no previous file with comments | « no previous file | remoting/client/jni/chromoting_jni_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698