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

Unified Diff: chrome/browser/history/history_backend_android.cc

Issue 930363002: Remove adapter method on HistoryBackend delegating to AndroidProviderBackend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/history/history_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/history_backend_android.cc
diff --git a/chrome/browser/history/history_backend_android.cc b/chrome/browser/history/history_backend_android.cc
deleted file mode 100644
index 86336036847c17f0b7f4e625ce3d9b229802e258..0000000000000000000000000000000000000000
--- a/chrome/browser/history/history_backend_android.cc
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/history/history_backend.h"
-
-#include "chrome/browser/history/android/android_provider_backend.h"
-
-namespace history {
-
-AndroidURLID HistoryBackend::InsertHistoryAndBookmark(
- const HistoryAndBookmarkRow& row) {
- AndroidURLID id = 0;
- if (android_provider_backend_)
- id = android_provider_backend_->InsertHistoryAndBookmark(row);
- return id;
-}
-
-AndroidStatement* HistoryBackend::QueryHistoryAndBookmarks(
- const std::vector<HistoryAndBookmarkRow::ColumnID>& projections,
- const std::string& selection,
- const std::vector<base::string16>& selection_args,
- const std::string& sort_order) {
- AndroidStatement* statement = NULL;
- if (android_provider_backend_) {
- statement = android_provider_backend_->QueryHistoryAndBookmarks(
- projections, selection, selection_args, sort_order);
- }
- return statement;
-}
-
-int HistoryBackend::UpdateHistoryAndBookmarks(
- const HistoryAndBookmarkRow& row,
- const std::string& selection,
- const std::vector<base::string16>& selection_args) {
- int count = 0;
- if (android_provider_backend_) {
- android_provider_backend_->UpdateHistoryAndBookmarks(
- row, selection, selection_args, &count);
- }
- return count;
-}
-
-int HistoryBackend::DeleteHistoryAndBookmarks(
- const std::string& selection,
- const std::vector<base::string16>& selection_args) {
- int count = 0;
- if (android_provider_backend_) {
- android_provider_backend_->DeleteHistoryAndBookmarks(
- selection, selection_args, &count);
- }
- return count;
-}
-
-int HistoryBackend::DeleteHistory(
- const std::string& selection,
- const std::vector<base::string16>& selection_args) {
- int count = 0;
- if (android_provider_backend_) {
- android_provider_backend_->DeleteHistory(selection, selection_args, &count);
- }
- return count;
-}
-
-// Statement -------------------------------------------------------------------
-
-int HistoryBackend::MoveStatement(history::AndroidStatement* statement,
- int current_pos,
- int destination) {
- DCHECK_LE(-1, current_pos);
- DCHECK_LE(-1, destination);
-
- int cur = current_pos;
- if (current_pos > destination) {
- statement->statement()->Reset(false);
- cur = -1;
- }
- for (; cur < destination; ++cur) {
- if (!statement->statement()->Step())
- break;
- }
-
- return cur;
-}
-
-void HistoryBackend::CloseStatement(AndroidStatement* statement) {
- delete statement;
-}
-
-// Search Term -----------------------------------------------------------------
-
-SearchTermID HistoryBackend::InsertSearchTerm(const SearchRow& row) {
- SearchTermID id = 0;
- if (android_provider_backend_)
- id = android_provider_backend_->InsertSearchTerm(row);
- return id;
-}
-
-int HistoryBackend::UpdateSearchTerms(
- const SearchRow& row,
- const std::string& selection,
- const std::vector<base::string16> selection_args) {
- int count = 0;
- if (android_provider_backend_) {
- android_provider_backend_->UpdateSearchTerms(
- row, selection, selection_args, &count);
- }
- return count;
-}
-
-int HistoryBackend::DeleteSearchTerms(
- const std::string& selection,
- const std::vector<base::string16> selection_args) {
- int count = 0;
- if (android_provider_backend_) {
- android_provider_backend_->DeleteSearchTerms(
- selection, selection_args, &count);
- }
- return count;
-}
-
-AndroidStatement* HistoryBackend::QuerySearchTerms(
- const std::vector<SearchRow::ColumnID>& projections,
- const std::string& selection,
- const std::vector<base::string16>& selection_args,
- const std::string& sort_order) {
- AndroidStatement* statement = NULL;
- if (android_provider_backend_) {
- statement = android_provider_backend_->QuerySearchTerms(projections,
- selection, selection_args, sort_order);
- }
- return statement;
-}
-
-} // namespace history
« no previous file with comments | « chrome/browser/history/history_backend.h ('k') | chrome/browser/history/history_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698