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

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: simplify type checking Created 3 years, 5 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
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | base/debug/activity_tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return static_cast<LibraryProcessType>( 216 return static_cast<LibraryProcessType>(
216 Java_LibraryLoader_getLibraryProcessType(env)); 217 Java_LibraryLoader_getLibraryProcessType(env));
217 } 218 }
218 219
219 void InitAtExitManager() { 220 void InitAtExitManager() {
220 g_at_exit_manager = new base::AtExitManager(); 221 g_at_exit_manager = new base::AtExitManager();
221 } 222 }
222 223
223 } // namespace android 224 } // namespace android
224 } // namespace base 225 } // namespace base
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | base/debug/activity_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698