| OLD | NEW |
| 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/android_history_provider_service.h" | 5 #include "chrome/browser/history/android/android_history_provider_service.h" |
| 6 | 6 |
| 7 #include "chrome/browser/favicon/favicon_service.h" | 7 #include "chrome/browser/favicon/favicon_service.h" |
| 8 #include "chrome/browser/favicon/favicon_service_factory.h" | 8 #include "chrome/browser/favicon/favicon_service_factory.h" |
| 9 #include "chrome/browser/history/history_backend.h" | 9 #include "chrome/browser/history/history_backend.h" |
| 10 #include "chrome/browser/history/history_service.h" | 10 #include "chrome/browser/history/history_service.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 callback.Run(current_pos); | 174 callback.Run(current_pos); |
| 175 return base::CancelableTaskTracker::kBadTaskId; | 175 return base::CancelableTaskTracker::kBadTaskId; |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 void AndroidHistoryProviderService::CloseStatement( | 179 void AndroidHistoryProviderService::CloseStatement( |
| 180 history::AndroidStatement* statement) { | 180 history::AndroidStatement* statement) { |
| 181 HistoryService* hs = HistoryServiceFactory::GetForProfile( | 181 HistoryService* hs = HistoryServiceFactory::GetForProfile( |
| 182 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 182 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
| 183 if (hs) { | 183 if (hs) { |
| 184 hs->ScheduleAndForget(HistoryService::PRIORITY_NORMAL, | 184 hs->ScheduleTask(HistoryService::PRIORITY_NORMAL, |
| 185 &HistoryBackend::CloseStatement, statement); | 185 base::Bind(&HistoryBackend::CloseStatement, |
| 186 hs->history_backend_.get(), statement)); |
| 186 } else { | 187 } else { |
| 187 delete statement; | 188 delete statement; |
| 188 } | 189 } |
| 189 } | 190 } |
| 190 | 191 |
| 191 base::CancelableTaskTracker::TaskId | 192 base::CancelableTaskTracker::TaskId |
| 192 AndroidHistoryProviderService::InsertSearchTerm( | 193 AndroidHistoryProviderService::InsertSearchTerm( |
| 193 const history::SearchRow& row, | 194 const history::SearchRow& row, |
| 194 const InsertCallback& callback, | 195 const InsertCallback& callback, |
| 195 base::CancelableTaskTracker* tracker) { | 196 base::CancelableTaskTracker* tracker) { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 base::CancelableTaskTracker::TaskId | 295 base::CancelableTaskTracker::TaskId |
| 295 AndroidHistoryProviderService::GetLargestRawFaviconForID( | 296 AndroidHistoryProviderService::GetLargestRawFaviconForID( |
| 296 favicon_base::FaviconID favicon_id, | 297 favicon_base::FaviconID favicon_id, |
| 297 const favicon_base::FaviconRawBitmapCallback& callback, | 298 const favicon_base::FaviconRawBitmapCallback& callback, |
| 298 base::CancelableTaskTracker* tracker) { | 299 base::CancelableTaskTracker* tracker) { |
| 299 FaviconService* fs = FaviconServiceFactory::GetForProfile( | 300 FaviconService* fs = FaviconServiceFactory::GetForProfile( |
| 300 profile_, ServiceAccessType::EXPLICIT_ACCESS); | 301 profile_, ServiceAccessType::EXPLICIT_ACCESS); |
| 301 DCHECK(fs); | 302 DCHECK(fs); |
| 302 return fs->GetLargestRawFaviconForID(favicon_id, callback, tracker); | 303 return fs->GetLargestRawFaviconForID(favicon_id, callback, tracker); |
| 303 } | 304 } |
| OLD | NEW |