Revert 8095 "Update StatsCollector's interface in preparation of..."
> Update StatsCollector's interface in preparation of more changes. > > This CL is the first of three and this one contains interface additions (not deletion for backwards compatibility) as well as a few necessary updates to internal code. > > The next CL will be in Chromium to consume the new new methods and remove dependency on the old ones. > > The third CL will then contain the bulk of the updates and improvements and be compatible with this interface. > > BUG=2822 > R=perkj@webrtc.org > > Review URL: https://webrtc-codereview.appspot.com/36829004 TBR=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/37669004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8096 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -1002,14 +1002,14 @@ class StatsObserverWrapper : public StatsObserver {
|
||||
int i = 0;
|
||||
for (const auto* report : reports) {
|
||||
ScopedLocalRefFrame local_ref_frame(jni);
|
||||
jstring j_id = JavaStringFromStdString(jni, report->id().ToString());
|
||||
jstring j_type = JavaStringFromStdString(jni, report->TypeToString());
|
||||
jobjectArray j_values = ValuesToJava(jni, report->values());
|
||||
jstring j_id = JavaStringFromStdString(jni, report->id);
|
||||
jstring j_type = JavaStringFromStdString(jni, report->type);
|
||||
jobjectArray j_values = ValuesToJava(jni, report->values);
|
||||
jobject j_report = jni->NewObject(*j_stats_report_class_,
|
||||
j_stats_report_ctor_,
|
||||
j_id,
|
||||
j_type,
|
||||
report->timestamp(),
|
||||
report->timestamp,
|
||||
j_values);
|
||||
jni->SetObjectArrayElement(reports_array, i++, j_report);
|
||||
}
|
||||
@ -1021,11 +1021,11 @@ class StatsObserverWrapper : public StatsObserver {
|
||||
values.size(), *j_value_class_, NULL);
|
||||
for (int i = 0; i < values.size(); ++i) {
|
||||
ScopedLocalRefFrame local_ref_frame(jni);
|
||||
const auto& value = values[i];
|
||||
const StatsReport::Value& value = values[i];
|
||||
// Should we use the '.name' enum value here instead of converting the
|
||||
// name to a string?
|
||||
jstring j_name = JavaStringFromStdString(jni, value->display_name());
|
||||
jstring j_value = JavaStringFromStdString(jni, value->value);
|
||||
jstring j_name = JavaStringFromStdString(jni, value.display_name());
|
||||
jstring j_value = JavaStringFromStdString(jni, value.value);
|
||||
jobject j_element_value =
|
||||
jni->NewObject(*j_value_class_, j_value_ctor_, j_name, j_value);
|
||||
jni->SetObjectArrayElement(j_values, i, j_element_value);
|
||||
|
||||
Reference in New Issue
Block a user