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

Unified Diff: chrome/browser/android/feature_utilities.cc

Issue 658903002: Starting a refactor to allow adding metrics on upload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to using RecordGeneralMetrics Created 6 years, 2 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 | « chrome/browser/android/feature_utilities.h ('k') | chrome/browser/metrics/android_metrics_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/feature_utilities.cc
diff --git a/chrome/browser/android/feature_utilities.cc b/chrome/browser/android/feature_utilities.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f770958c15cdfe87898d40ce2f083246c178af0b
--- /dev/null
+++ b/chrome/browser/android/feature_utilities.cc
@@ -0,0 +1,33 @@
+// 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 "chrome/browser/android/feature_utilities.h"
+
+#include "jni/FeatureUtilities_jni.h"
+
+namespace {
+ static bool document_mode_enabled = false;
Alexei Svitkine (slow) 2014/10/20 21:19:27 Nit: No need for "static" inside an anon namespace
+} // namespace
+
+namespace chrome {
+namespace android {
+
+RunningModeHistogram GetDocumentModeValue() {
+ return document_mode_enabled ? RUNNING_MODE_DOCUMENT_MODE :
+ RUNNING_MODE_TABBED_MODE;
+}
+
+} // namespace android
+} // namespace chrome
+
+
+static void SetDocumentModeEnabled(JNIEnv* env,
+ jclass clazz,
+ jboolean enabled) {
+ document_mode_enabled = enabled;
+}
+
+bool RegisterFeatureUtilities(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
« no previous file with comments | « chrome/browser/android/feature_utilities.h ('k') | chrome/browser/metrics/android_metrics_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698