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

Unified Diff: components/cronet/android/histogram_manager.cc

Issue 904033004: [Cronet] Make HistogramManager an abstract class to break dependency on native library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Helen's comments. Created 5 years, 10 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
Index: components/cronet/android/histogram_manager.cc
diff --git a/components/cronet/android/histogram_manager.cc b/components/cronet/android/histogram_manager.cc
deleted file mode 100644
index 4db69601387a2bfd5cbe18fefeef01c5b544bb98..0000000000000000000000000000000000000000
--- a/components/cronet/android/histogram_manager.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/cronet/android/histogram_manager.h"
-
-#include <string>
-#include <vector>
-
-#include "base/android/jni_array.h"
-#include "base/metrics/statistics_recorder.h"
-#include "components/metrics/histogram_manager.h"
-
-#include "jni/HistogramManager_jni.h"
-
-namespace cronet {
-
-// Explicitly register static JNI functions.
-bool HistogramManagerRegisterJni(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-static void EnsureInitialized(JNIEnv* env, jobject jcaller) {
- base::StatisticsRecorder::Initialize();
-}
-
-static jbyteArray GetHistogramDeltas(JNIEnv* env, jobject jcaller) {
- std::vector<uint8> data;
- if (!metrics::HistogramManager::GetInstance()->GetDeltas(&data))
- return NULL;
- return base::android::ToJavaByteArray(env, &data[0], data.size()).Release();
-}
-
-} // namespace cronet

Powered by Google App Engine
This is Rietveld 408576698