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

Side by Side Diff: chrome/browser/history/android/sqlite_cursor.cc

Issue 330603004: Rename FaviconBitmapXxx to FaviconRawBitmapXxx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/history/android/sqlite_cursor.h" 5 #include "chrome/browser/history/android/sqlite_cursor.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 image_data->assign(bitmap_data->front(), 196 image_data->assign(bitmap_data->front(),
197 bitmap_data->front() + bitmap_data->size()); 197 bitmap_data->front() + bitmap_data->size());
198 return true; 198 return true;
199 } 199 }
200 200
201 return false; 201 return false;
202 } 202 }
203 203
204 void SQLiteCursor::GetFaviconForIDInUIThread( 204 void SQLiteCursor::GetFaviconForIDInUIThread(
205 favicon_base::FaviconID id, 205 favicon_base::FaviconID id,
206 const favicon_base::FaviconRawCallback& callback) { 206 const favicon_base::FaviconRawBitmapCallback& callback) {
207 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 207 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
208 if (!tracker_.get()) 208 if (!tracker_.get())
209 tracker_.reset(new base::CancelableTaskTracker()); 209 tracker_.reset(new base::CancelableTaskTracker());
210 favicon_service_->GetLargestRawFaviconForID(id, callback, tracker_.get()); 210 favicon_service_->GetLargestRawFaviconForID(id, callback, tracker_.get());
211 } 211 }
212 212
213 void SQLiteCursor::OnFaviconData( 213 void SQLiteCursor::OnFaviconData(
214 const favicon_base::FaviconBitmapResult& bitmap_result) { 214 const favicon_base::FaviconRawBitmapResult& bitmap_result) {
215 favicon_bitmap_result_ = bitmap_result; 215 favicon_bitmap_result_ = bitmap_result;
216 event_.Signal(); 216 event_.Signal();
217 if (test_observer_) 217 if (test_observer_)
218 test_observer_->OnGetFaviconResult(); 218 test_observer_->OnGetFaviconResult();
219 } 219 }
220 220
221 void SQLiteCursor::OnMoved(AndroidHistoryProviderService::Handle handle, 221 void SQLiteCursor::OnMoved(AndroidHistoryProviderService::Handle handle,
222 int pos) { 222 int pos) {
223 position_ = pos; 223 position_ = pos;
224 event_.Signal(); 224 event_.Signal();
(...skipping 10 matching lines...) Expand all
235 } 235 }
236 236
237 void SQLiteCursor::RunMoveStatementOnUIThread(int pos) { 237 void SQLiteCursor::RunMoveStatementOnUIThread(int pos) {
238 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 238 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
239 if (!consumer_.get()) 239 if (!consumer_.get())
240 consumer_.reset(new CancelableRequestConsumer()); 240 consumer_.reset(new CancelableRequestConsumer());
241 service_->MoveStatement( 241 service_->MoveStatement(
242 statement_, position_, pos, consumer_.get(), 242 statement_, position_, pos, consumer_.get(),
243 base::Bind(&SQLiteCursor::OnMoved, base::Unretained(this))); 243 base::Bind(&SQLiteCursor::OnMoved, base::Unretained(this)));
244 } 244 }
OLDNEW
« no previous file with comments | « chrome/browser/history/android/sqlite_cursor.h ('k') | chrome/browser/history/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698