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

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

Issue 137263007: Move CancelableTaskTracker to //base/task/CancelableTaskTracker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to base/task/cancelable_task_tracker* Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/favicon_helper.h" 5 #include "chrome/browser/android/favicon_helper.h"
6 6
7 #include <jni.h> 7 #include <jni.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 j_icon_url.obj()); 55 j_icon_url.obj());
56 } 56 }
57 57
58 } // namespace 58 } // namespace
59 59
60 static jlong Init(JNIEnv* env, jclass clazz) { 60 static jlong Init(JNIEnv* env, jclass clazz) {
61 return reinterpret_cast<intptr_t>(new FaviconHelper()); 61 return reinterpret_cast<intptr_t>(new FaviconHelper());
62 } 62 }
63 63
64 FaviconHelper::FaviconHelper() { 64 FaviconHelper::FaviconHelper() {
65 cancelable_task_tracker_.reset(new CancelableTaskTracker()); 65 cancelable_task_tracker_.reset(new base::CancelableTaskTracker());
66 } 66 }
67 67
68 void FaviconHelper::Destroy(JNIEnv* env, jobject obj) { 68 void FaviconHelper::Destroy(JNIEnv* env, jobject obj) {
69 delete this; 69 delete this;
70 } 70 }
71 71
72 jboolean FaviconHelper::GetLocalFaviconImageForURL( 72 jboolean FaviconHelper::GetLocalFaviconImageForURL(
73 JNIEnv* env, 73 JNIEnv* env,
74 jobject obj, 74 jobject obj,
75 jobject j_profile, 75 jobject j_profile,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return color_utils::CalculateKMeanColorOfPNG( 157 return color_utils::CalculateKMeanColorOfPNG(
158 png_data, min_darkness, max_brightness, &sampler); 158 png_data, min_darkness, max_brightness, &sampler);
159 } 159 }
160 160
161 FaviconHelper::~FaviconHelper() {} 161 FaviconHelper::~FaviconHelper() {}
162 162
163 // static 163 // static
164 bool FaviconHelper::RegisterFaviconHelper(JNIEnv* env) { 164 bool FaviconHelper::RegisterFaviconHelper(JNIEnv* env) {
165 return RegisterNativesImpl(env); 165 return RegisterNativesImpl(env);
166 } 166 }
OLDNEW
« no previous file with comments | « chrome/browser/android/favicon_helper.h ('k') | chrome/browser/android/provider/chrome_browser_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698