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

Side by Side Diff: chrome/browser/android/logo_bridge.cc

Issue 2762853003: [Doodle] Add UMA for doodle image downloads (Closed)
Patch Set: better histograms enum, rebase Created 3 years, 9 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 | « no previous file | components/search_provider_logos/logo_tracker.h » ('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 "chrome/browser/android/logo_bridge.h" 5 #include "chrome/browser/android/logo_bridge.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 JNIEnv* env = base::android::AttachCurrentThread(); 292 JNIEnv* env = base::android::AttachCurrentThread();
293 293
294 if (image.IsEmpty()) { 294 if (image.IsEmpty()) {
295 DLOG(WARNING) << "Failed to download doodle image"; 295 DLOG(WARNING) << "Failed to download doodle image";
296 Java_LogoObserver_onLogoAvailable(env, j_logo_observer_, 296 Java_LogoObserver_onLogoAvailable(env, j_logo_observer_,
297 ScopedJavaLocalRef<jobject>(), 297 ScopedJavaLocalRef<jobject>(),
298 config_from_cache); 298 config_from_cache);
299 return; 299 return;
300 } 300 }
301 301
302 UMA_HISTOGRAM_BOOLEAN("NewTabPage.LogoImageDownloaded",
303 metadata.from_http_cache);
304
302 ScopedJavaLocalRef<jobject> j_logo = MakeJavaLogo( 305 ScopedJavaLocalRef<jobject> j_logo = MakeJavaLogo(
303 env, image.ToSkBitmap(), on_click_url, alt_text, animated_image_url); 306 env, image.ToSkBitmap(), on_click_url, alt_text, animated_image_url);
304 Java_LogoObserver_onLogoAvailable(env, j_logo_observer_, j_logo, 307 Java_LogoObserver_onLogoAvailable(env, j_logo_observer_, j_logo,
305 config_from_cache); 308 config_from_cache);
306 } 309 }
307 310
308 // static 311 // static
309 bool RegisterLogoBridge(JNIEnv* env) { 312 bool RegisterLogoBridge(JNIEnv* env) {
310 return RegisterNativesImpl(env); 313 return RegisterNativesImpl(env);
311 } 314 }
OLDNEW
« no previous file with comments | « no previous file | components/search_provider_logos/logo_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698