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

Unified Diff: remoting/client/jni/jni_client.h

Issue 2643483003: [Remoting Android] Refactor ClientTelemetryLogger (Closed)
Patch Set: PTAL Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/client/jni/connect_to_host_info.cc ('k') | remoting/client/jni/jni_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/jni/jni_client.h
diff --git a/remoting/client/jni/jni_client.h b/remoting/client/jni/jni_client.h
index 412d2e8ba7db68ebe70bdcd305796e43fd1aeaa7..8fdd46d88c9bd60979cafc10782cfba04ff2f52b 100644
--- a/remoting/client/jni/jni_client.h
+++ b/remoting/client/jni/jni_client.h
@@ -20,6 +20,8 @@ class ChromotingJniInstance;
class JniGlDisplayHandler;
class JniPairingSecretFetcher;
+struct ConnectToHostInfo;
+
// Houses resources scoped to a session and exposes JNI interface to the
// Java client during a session. All its methods should be invoked exclusively
// from the UI thread unless otherwise noted.
@@ -29,22 +31,10 @@ class JniClient {
base::android::ScopedJavaGlobalRef<jobject> java_client);
virtual ~JniClient();
- // TODO(yuweih): Put these arguments into a struct.
// Initiates a connection with the specified host. To skip the attempt at
// pair-based authentication, leave |pairing_id| and |pairing_secret| as
// empty strings.
- void ConnectToHost(const std::string& username,
- const std::string& auth_token,
- const std::string& host_jid,
- const std::string& host_id,
- const std::string& host_pubkey,
- const std::string& pairing_id,
- const std::string& pairing_secret,
- const std::string& capabilities,
- const std::string& flags,
- const std::string& host_version,
- const std::string& host_os,
- const std::string& host_os_version);
+ void ConnectToHost(const ConnectToHostInfo& info);
// Terminates any ongoing connection attempt and cleans up by nullifying
// |session_|. This is a no-op unless |session| is currently non-null.
@@ -81,15 +71,16 @@ class JniClient {
// The following methods are exposed to Java via JNI.
+ // TODO(yuweih): Pass a class/struct from Java holding all these arguments.
void Connect(JNIEnv* env,
const base::android::JavaParamRef<jobject>& caller,
const base::android::JavaParamRef<jstring>& username,
- const base::android::JavaParamRef<jstring>& authToken,
- const base::android::JavaParamRef<jstring>& hostJid,
- const base::android::JavaParamRef<jstring>& hostId,
- const base::android::JavaParamRef<jstring>& hostPubkey,
- const base::android::JavaParamRef<jstring>& pairId,
- const base::android::JavaParamRef<jstring>& pairSecret,
+ const base::android::JavaParamRef<jstring>& auth_token,
+ const base::android::JavaParamRef<jstring>& host_jid,
+ const base::android::JavaParamRef<jstring>& host_id,
+ const base::android::JavaParamRef<jstring>& host_pubkey,
+ const base::android::JavaParamRef<jstring>& pair_id,
+ const base::android::JavaParamRef<jstring>& pair_secret,
const base::android::JavaParamRef<jstring>& capabilities,
const base::android::JavaParamRef<jstring>& flags,
const base::android::JavaParamRef<jstring>& host_version,
« no previous file with comments | « remoting/client/jni/connect_to_host_info.cc ('k') | remoting/client/jni/jni_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698