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

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

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 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 // The history system runs on a background thread so that potentially slow 5 // The history system runs on a background thread so that potentially slow
6 // database operations don't delay the browser. This backend processing is 6 // database operations don't delay the browser. This backend processing is
7 // represented by HistoryBackend. The HistoryService's job is to dispatch to 7 // represented by HistoryBackend. The HistoryService's job is to dispatch to
8 // that thread. 8 // that thread.
9 // 9 //
10 // Main thread History thread 10 // Main thread History thread
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 history::TopSites* ts = profile_->GetTopSitesWithoutCreating(); 885 history::TopSites* ts = profile_->GetTopSitesWithoutCreating();
886 if (ts) 886 if (ts)
887 ts->MigrateFromHistory(); 887 ts->MigrateFromHistory();
888 } 888 }
889 } 889 }
890 890
891 void HistoryService::OnTopSitesReady() { 891 void HistoryService::OnTopSitesReady() {
892 ScheduleAndForget(PRIORITY_NORMAL, 892 ScheduleAndForget(PRIORITY_NORMAL,
893 &HistoryBackend::MigrateThumbnailsDatabase); 893 &HistoryBackend::MigrateThumbnailsDatabase);
894 } 894 }
895
896 #if defined(OS_ANDROID)
897
898 void HistoryService::InsertHistoryAndBookmark(
899 AndroidProviderService::InsertRequest* request,
900 const history::HistoryAndBookmarkRow& row) {
901 Schedule(PRIORITY_NORMAL, &HistoryBackend::InsertHistoryAndBookmark, NULL,
902 request, row);
903 }
904
905 void HistoryService::QueryHistoryAndBookmarks(
906 AndroidProviderService::QueryRequest* request,
907 const std::vector<history::HistoryAndBookmarkRow::ColumnID>& projections,
908 const std::string& selection,
909 const std::vector<string16>& selection_args,
910 const std::string& sort_order) {
911 Schedule(PRIORITY_NORMAL, &HistoryBackend::QueryHistoryAndBookmarks, NULL,
912 request, projections, selection, selection_args, sort_order);
913 }
914
915 void HistoryService::UpdateHistoryAndBookmarks(
916 AndroidProviderService::UpdateRequest* request,
917 const history::HistoryAndBookmarkRow& row,
918 const std::string& selection,
919 const std::vector<string16>& selection_args) {
920 Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateHistoryAndBookmarks, NULL,
921 request, row, selection, selection_args);
922 }
923
924 void HistoryService::DeleteHistoryAndBookmarks(
925 AndroidProviderService::DeleteRequest* request,
926 const std::string& selection,
927 const std::vector<string16>& selection_args) {
928 Schedule(PRIORITY_NORMAL, &HistoryBackend::DeleteHistoryAndBookmarks, NULL,
929 request, selection, selection_args);
930 }
931
932 void HistoryService::DeleteHistory(
933 AndroidProviderService::DeleteRequest* request,
934 const std::string& selection,
935 const std::vector<string16>& selection_args) {
936 Schedule(PRIORITY_NORMAL, &HistoryBackend::DeleteHistory, NULL, request,
937 selection, selection_args);
938 }
939
940 void HistoryService::MoveStatement(
941 AndroidProviderService::MoveStatementRequest* request,
942 history::AndroidStatement* statement,
943 int current_pos,
944 int destination) {
945 Schedule(PRIORITY_NORMAL, &HistoryBackend::MoveStatement, NULL, request,
946 statement, current_pos, destination);
947 }
948
949 void HistoryService::CloseStatement(history::AndroidStatement* statement) {
950 ScheduleAndForget(PRIORITY_NORMAL, &HistoryBackend::CloseStatement,
951 statement);
952 }
953
954 void HistoryService::InsertSearchTerm(
955 AndroidProviderService::InsertRequest* request,
956 const history::SearchRow& row) {
957 Schedule(PRIORITY_NORMAL, &HistoryBackend::InsertSearchTerm, NULL, request,
958 row);
959 }
960
961 void HistoryService::UpdateSearchTerms(
962 AndroidProviderService::UpdateRequest* request,
963 const history::SearchRow& row,
964 const std::string& selection,
965 const std::vector<string16>& selection_arg) {
966 Schedule(PRIORITY_NORMAL, &HistoryBackend::UpdateSearchTerms, NULL, request,
967 row, selection, selection_arg);
968 }
969
970 void HistoryService::DeleteSearchTerms(
971 AndroidProviderService::DeleteRequest* request,
972 const std::string& selection,
973 const std::vector<string16>& selection_arg) {
974 Schedule(PRIORITY_NORMAL, &HistoryBackend::DeleteSearchTerms, NULL, request,
975 selection, selection_arg);
976 }
977
978 void HistoryService::QuerySearchTerms(
979 AndroidProviderService::QueryRequest* request,
980 const std::vector<history::SearchRow::ColumnID>& projections,
981 const std::string& selection,
982 const std::vector<string16>& selection_args,
983 const std::string& sort_order) {
984 Schedule(PRIORITY_NORMAL, &HistoryBackend::QuerySearchTerms, NULL, request,
985 projections, selection, selection_args, sort_order);
986 }
987
988 #endif // defined(OS_ANDROID)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698