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

Unified Diff: chrome/browser/history/history_backend.h

Issue 10217010: Completed the code path from AndroidProviderService to HistoryBackend. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Init Created 8 years, 8 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
Index: chrome/browser/history/history_backend.h
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index 0e31679fcb87cc74849f2c07ce0ee1d32c53b7f4..1a657adef2a5a0f0dbd2e39b096a581185a65bd1 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -34,7 +34,9 @@ struct DownloadPersistentStoreInfo;
}
namespace history {
-
+#if defined(OS_ANDROID)
+class AndroidProviderBackend;
+#endif
class CommitLaterTask;
class HistoryPublisher;
class VisitFilter;
@@ -306,6 +308,64 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
const string16& prefix,
int max_count);
+#if defined(OS_ANDROID)
+ // Android Provider ---------------------------------------------------------
+
+ // History and bookmarks ----------------------------------------------------
+ void InsertHistoryAndBookmark(scoped_refptr<InsertRequest> request,
+ const HistoryAndBookmarkRow& row);
+
+ void QueryHistoryAndBookmarks(
+ scoped_refptr<QueryRequest> request,
+ const std::vector<HistoryAndBookmarkRow::ColumnID>& projections,
+ const std::string& selection,
+ const std::vector<string16>& selection_args,
+ const std::string& sort_order);
+
+ void UpdateHistoryAndBookmarks(scoped_refptr<UpdateRequest> request,
+ const HistoryAndBookmarkRow& row,
+ const std::string& selection,
+ const std::vector<string16>& selection_args);
+
+ void DeleteHistoryAndBookmarks(scoped_refptr<DeleteRequest> request,
+ const std::string& selection,
+ const std::vector<string16>& selection_args);
+
+ void DeleteHistory(scoped_refptr<DeleteRequest> request,
+ const std::string& selection,
+ const std::vector<string16>& selection_args);
+
+ // Statement ----------------------------------------------------------------
+ // Move the statement's current position.
+ void MoveStatement(scoped_refptr<MoveStatementRequest> request,
+ history::AndroidStatement* statement,
+ int current_pos,
+ int destination);
+
+ // Close the given statement. The ownership is transfered.
+ void CloseStatement(AndroidStatement* statement);
+
+ // Search terms -------------------------------------------------------------
+ void InsertSearchTerm(scoped_refptr<InsertRequest> request,
+ const SearchRow& row);
+
+ void UpdateSearchTerms(scoped_refptr<UpdateRequest> request,
+ const SearchRow& row,
+ const std::string& selection,
+ const std::vector<string16> selection_args);
+
+ void DeleteSearchTerms(scoped_refptr<DeleteRequest> request,
+ const std::string& selection,
+ const std::vector<string16> selection_args);
+
+ void QuerySearchTerms(scoped_refptr<QueryRequest> request,
+ const std::vector<SearchRow::ColumnID>& projections,
+ const std::string& selection,
+ const std::vector<string16>& selection_args,
+ const std::string& sort_order);
+
+#endif // defined(OS_ANDROID)
+
// Generic operations --------------------------------------------------------
void ProcessDBTask(scoped_refptr<HistoryDBTaskRequest> request);
@@ -419,6 +479,11 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
FilePath GetFaviconsFileName() const;
FilePath GetArchivedFileName() const;
+#if defined(OS_ANDROID)
+ // Returns the name of android cache database.
+ FilePath GetAndroidCacheFileName() const;
+#endif
+
class URLQuerier;
friend class URLQuerier;
@@ -679,6 +744,11 @@ class HistoryBackend : public base::RefCountedThreadSafe<HistoryBackend>,
// history data from us. Can be NULL if there are no listeners.
scoped_ptr<HistoryPublisher> history_publisher_;
+#if defined(OS_ANDROID)
+ // Used to provide the Android ContentProvider APIs.
+ scoped_ptr<AndroidProviderBackend> android_provider_backend_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(HistoryBackend);
};

Powered by Google App Engine
This is Rietveld 408576698