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

Side by Side Diff: base/android/library_loader/library_loader_hooks.cc

Issue 2886933003: Use stricter type checking in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: nocompile test Created 3 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "base/android/library_loader/library_loader_hooks.h" 5 #include "base/android/library_loader/library_loader_hooks.h"
6 6
7 #include "base/android/command_line_android.h" 7 #include "base/android/command_line_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/android/library_loader/library_load_from_apk_status_codes.h" 9 #include "base/android/library_loader/library_load_from_apk_status_codes.h"
10 #include "base/android/library_loader/library_prefetcher.h" 10 #include "base/android/library_loader/library_prefetcher.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 histogram_code = load_at_fixed_address_failed 117 histogram_code = load_at_fixed_address_failed
118 ? LOW_MEMORY_LFA_BACKOFF_USED : LOW_MEMORY_LFA_SUCCESS; 118 ? LOW_MEMORY_LFA_BACKOFF_USED : LOW_MEMORY_LFA_SUCCESS;
119 } else { 119 } else {
120 histogram_code = NORMAL_LRA_SUCCESS; 120 histogram_code = NORMAL_LRA_SUCCESS;
121 } 121 }
122 UMA_HISTOGRAM_ENUMERATION("ChromiumAndroidLinker.BrowserStates", 122 UMA_HISTOGRAM_ENUMERATION("ChromiumAndroidLinker.BrowserStates",
123 histogram_code, 123 histogram_code,
124 MAX_BROWSER_HISTOGRAM_CODE); 124 MAX_BROWSER_HISTOGRAM_CODE);
125 125
126 // Record the device support for loading a library directly from the APK file. 126 // Record the device support for loading a library directly from the APK file.
127 UMA_HISTOGRAM_ENUMERATION("ChromiumAndroidLinker.LibraryLoadFromApkStatus", 127 UMA_HISTOGRAM_ENUMERATION(
128 library_load_from_apk_status, 128 "ChromiumAndroidLinker.LibraryLoadFromApkStatus",
129 LIBRARY_LOAD_FROM_APK_STATUS_CODES_MAX); 129 static_cast<LibraryLoadFromApkStatusCodes>(library_load_from_apk_status),
130 LIBRARY_LOAD_FROM_APK_STATUS_CODES_MAX);
130 131
131 // Record how long it took to load the shared libraries. 132 // Record how long it took to load the shared libraries.
132 UMA_HISTOGRAM_TIMES("ChromiumAndroidLinker.BrowserLoadTime", 133 UMA_HISTOGRAM_TIMES("ChromiumAndroidLinker.BrowserLoadTime",
133 base::TimeDelta::FromMilliseconds(library_load_time_ms)); 134 base::TimeDelta::FromMilliseconds(library_load_time_ms));
134 } 135 }
135 136
136 static void RecordLibraryPreloaderBrowserHistogram( 137 static void RecordLibraryPreloaderBrowserHistogram(
137 JNIEnv* env, 138 JNIEnv* env,
138 const JavaParamRef<jobject>& jcaller, 139 const JavaParamRef<jobject>& jcaller,
139 jint status) { 140 jint status) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 return static_cast<LibraryProcessType>( 220 return static_cast<LibraryProcessType>(
220 Java_LibraryLoader_getLibraryProcessType(env)); 221 Java_LibraryLoader_getLibraryProcessType(env));
221 } 222 }
222 223
223 void InitAtExitManager() { 224 void InitAtExitManager() {
224 g_at_exit_manager = new base::AtExitManager(); 225 g_at_exit_manager = new base::AtExitManager();
225 } 226 }
226 227
227 } // namespace android 228 } // namespace android
228 } // namespace base 229 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698