summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2014-09-25 02:28:13 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-25 09:28:49 +0000
commitbc766efbf9e4cd3b8b530d8c002525ac730e1fd4 (patch)
tree2ad91896be51e276ca6a9fa45fa2b5ee578814a5
parent0b7df51ab35a81243e964b9a4eaae504b4cec5a9 (diff)
downloadchromium_src-bc766efbf9e4cd3b8b530d8c002525ac730e1fd4.zip
chromium_src-bc766efbf9e4cd3b8b530d8c002525ac730e1fd4.tar.gz
chromium_src-bc766efbf9e4cd3b8b530d8c002525ac730e1fd4.tar.bz2
Componentize history_types.{cc,h} and android_history_types.{cc,h}
Move history_types.{cc,h} and android_history_types.{cc,h} to the history component and create a new target history_core_android. BUG=371816 Review URL: https://codereview.chromium.org/584013002 Cr-Commit-Position: refs/heads/master@{#296684}
-rw-r--r--chrome/browser/android/most_visited_sites.h2
-rw-r--r--chrome/browser/android/provider/chrome_browser_provider.cc2
-rw-r--r--chrome/browser/android/provider/chrome_browser_provider.h2
-rw-r--r--chrome/browser/autocomplete/history_quick_provider.h2
-rw-r--r--chrome/browser/autocomplete/history_url_provider.cc2
-rw-r--r--chrome/browser/autocomplete/zero_suggest_provider.cc2
-rw-r--r--chrome/browser/autocomplete/zero_suggest_provider.h2
-rw-r--r--chrome/browser/custom_home_pages_table_model.h2
-rw-r--r--chrome/browser/download/download_target_determiner_unittest.cc2
-rw-r--r--chrome/browser/extensions/api/history/history_api.cc2
-rw-r--r--chrome/browser/extensions/api/top_sites/top_sites_api.h2
-rw-r--r--chrome/browser/history/android/android_cache_database.h2
-rw-r--r--chrome/browser/history/android/android_history_provider_service.h2
-rw-r--r--chrome/browser/history/android/android_history_provider_service_unittest.cc2
-rw-r--r--chrome/browser/history/android/android_provider_backend.h2
-rw-r--r--chrome/browser/history/android/android_urls_database.h2
-rw-r--r--chrome/browser/history/android/sql_handler.h2
-rw-r--r--chrome/browser/history/android/sqlite_cursor.cc2
-rw-r--r--chrome/browser/history/android/sqlite_cursor.h2
-rw-r--r--chrome/browser/history/android/sqlite_cursor_unittest.cc2
-rw-r--r--chrome/browser/history/download_database.cc2
-rw-r--r--chrome/browser/history/expire_history_backend.h2
-rw-r--r--chrome/browser/history/history_backend.h4
-rw-r--r--chrome/browser/history/history_notifications.h2
-rw-r--r--chrome/browser/history/history_service.cc2
-rw-r--r--chrome/browser/history/history_types.cc84
-rw-r--r--chrome/browser/history/history_types.h142
-rw-r--r--chrome/browser/history/in_memory_url_index.h2
-rw-r--r--chrome/browser/history/in_memory_url_index_types.h2
-rw-r--r--chrome/browser/history/scored_history_match.h2
-rw-r--r--chrome/browser/history/thumbnail_database.h2
-rw-r--r--chrome/browser/history/top_sites.h2
-rw-r--r--chrome/browser/history/top_sites_backend.h2
-rw-r--r--chrome/browser/history/top_sites_cache.h2
-rw-r--r--chrome/browser/history/top_sites_database.cc2
-rw-r--r--chrome/browser/history/top_sites_database.h2
-rw-r--r--chrome/browser/history/top_sites_database_unittest.cc2
-rw-r--r--chrome/browser/history/top_sites_impl.h2
-rw-r--r--chrome/browser/history/top_sites_impl_unittest.cc2
-rw-r--r--chrome/browser/history/typed_url_syncable_service.h2
-rw-r--r--chrome/browser/history/typed_url_syncable_service_unittest.cc2
-rw-r--r--chrome/browser/history/visit_database.h2
-rw-r--r--chrome/browser/history/visit_filter.cc2
-rw-r--r--chrome/browser/history/visit_filter_unittest.cc2
-rw-r--r--chrome/browser/history/visit_tracker.h2
-rw-r--r--chrome/browser/history/visitsegment_database.h2
-rw-r--r--chrome/browser/history/web_history_service.h2
-rw-r--r--chrome/browser/importer/external_process_importer_client.h2
-rw-r--r--chrome/browser/importer/profile_writer.h2
-rw-r--r--chrome/browser/importer/profile_writer_unittest.cc2
-rw-r--r--chrome/browser/jumplist_win.h2
-rw-r--r--chrome/browser/notifications/message_center_settings_controller.cc2
-rw-r--r--chrome/browser/precache/most_visited_urls_provider.cc2
-rw-r--r--chrome/browser/predictors/autocomplete_action_predictor.h2
-rw-r--r--chrome/browser/predictors/resource_prefetch_predictor.h2
-rw-r--r--chrome/browser/predictors/resource_prefetch_predictor_unittest.cc2
-rw-r--r--chrome/browser/prerender/prerender_contents.cc2
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor.cc2
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor.h2
-rw-r--r--chrome/browser/search/instant_service.h2
-rw-r--r--chrome/browser/supervised_user/supervised_user_navigation_observer.cc2
-rw-r--r--chrome/browser/sync/glue/favicon_cache.cc2
-rw-r--r--chrome/browser/sync/glue/favicon_cache.h2
-rw-r--r--chrome/browser/sync/glue/typed_url_model_associator.h2
-rw-r--r--chrome/browser/sync/glue/typed_url_model_associator_unittest.cc2
-rw-r--r--chrome/browser/sync/profile_sync_service_typed_url_unittest.cc2
-rw-r--r--chrome/browser/sync/test/integration/bookmarks_helper.cc2
-rw-r--r--chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc2
-rw-r--r--chrome/browser/sync/test/integration/typed_urls_helper.cc2
-rw-r--r--chrome/browser/sync/test/integration/typed_urls_helper.h2
-rw-r--r--chrome/browser/thumbnails/thumbnail_list_source.h2
-rw-r--r--chrome/browser/ui/android/navigation_popup.cc2
-rw-r--r--chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm2
-rw-r--r--chrome/browser/ui/search/instant_extended_interactive_uitest.cc2
-rw-r--r--chrome/browser/ui/sync/profile_signin_confirmation_helper.cc2
-rw-r--r--chrome/browser/ui/views/frame/global_menu_bar_x11.h2
-rw-r--r--chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc2
-rw-r--r--chrome/browser/ui/webui/history_ui.cc2
-rw-r--r--chrome/browser/ui/webui/ntp/most_visited_handler.h2
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_page_handler.h2
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_source_top_sites.h2
-rw-r--r--chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h2
-rw-r--r--chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc2
-rw-r--r--chrome/chrome_browser.gypi5
-rw-r--r--chrome/chrome_tests_unit.gypi2
-rw-r--r--components/components_tests.gyp3
-rw-r--r--components/history.gypi24
-rw-r--r--components/history/DEPS1
-rw-r--r--components/history/core/android/BUILD.gn16
-rw-r--r--components/history/core/android/android_history_types.cc (renamed from chrome/browser/history/android/android_history_types.cc)2
-rw-r--r--components/history/core/android/android_history_types.h (renamed from chrome/browser/history/android/android_history_types.h)8
-rw-r--r--components/history/core/android/android_history_types_unittest.cc (renamed from chrome/browser/history/android/android_history_types_unittest.cc)2
-rw-r--r--components/history/core/browser/BUILD.gn1
-rw-r--r--components/history/core/browser/history_types.cc70
-rw-r--r--components/history/core/browser/history_types.h129
-rw-r--r--components/history/core/browser/history_types_unittest.cc (renamed from chrome/browser/history/history_types_unittest.cc)2
99 files changed, 337 insertions, 324 deletions
diff --git a/chrome/browser/android/most_visited_sites.h b/chrome/browser/android/most_visited_sites.h
index 4a24ad7..6609846 100644
--- a/chrome/browser/android/most_visited_sites.h
+++ b/chrome/browser/android/most_visited_sites.h
@@ -10,9 +10,9 @@
#include "base/android/scoped_java_ref.h"
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_service_observer.h"
+#include "components/history/core/browser/history_types.h"
#include "components/suggestions/proto/suggestions.pb.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/android/provider/chrome_browser_provider.cc b/chrome/browser/android/provider/chrome_browser_provider.cc
index b0d4ad0..6031f00 100644
--- a/chrome/browser/android/provider/chrome_browser_provider.cc
+++ b/chrome/browser/android/provider/chrome_browser_provider.cc
@@ -26,7 +26,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
-#include "chrome/browser/history/android/android_history_types.h"
#include "chrome/browser/history/android/sqlite_cursor.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/profiles/profile.h"
@@ -34,6 +33,7 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_utils.h"
+#include "components/history/core/android/android_history_types.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/android/provider/chrome_browser_provider.h b/chrome/browser/android/provider/chrome_browser_provider.h
index e8d7320..bb430e0 100644
--- a/chrome/browser/android/provider/chrome_browser_provider.h
+++ b/chrome/browser/android/provider/chrome_browser_provider.h
@@ -10,8 +10,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/cancelable_task_tracker.h"
-#include "chrome/browser/history/android/android_history_types.h"
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
+#include "components/history/core/android/android_history_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/autocomplete/history_quick_provider.h b/chrome/browser/autocomplete/history_quick_provider.h
index 105394b..19ad7f3 100644
--- a/chrome/browser/autocomplete/history_quick_provider.h
+++ b/chrome/browser/autocomplete/history_quick_provider.h
@@ -10,8 +10,8 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/autocomplete/history_provider.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_url_index.h"
+#include "components/history/core/browser/history_types.h"
#include "components/omnibox/autocomplete_input.h"
#include "components/omnibox/autocomplete_match.h"
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 407bc90..d62a50b 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -20,7 +20,6 @@
#include "chrome/browser/history/history_database.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_url_index_types.h"
#include "chrome/browser/history/scored_history_match.h"
#include "chrome/browser/profiles/profile.h"
@@ -30,6 +29,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "components/bookmarks/browser/bookmark_utils.h"
+#include "components/history/core/browser/history_types.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
#include "components/omnibox/autocomplete_match.h"
#include "components/omnibox/autocomplete_provider_listener.h"
diff --git a/chrome/browser/autocomplete/zero_suggest_provider.cc b/chrome/browser/autocomplete/zero_suggest_provider.cc
index 4a753cb..0e266f5 100644
--- a/chrome/browser/autocomplete/zero_suggest_provider.cc
+++ b/chrome/browser/autocomplete/zero_suggest_provider.cc
@@ -19,10 +19,10 @@
#include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h"
#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
#include "chrome/browser/autocomplete/history_url_provider.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
+#include "components/history/core/browser/history_types.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
#include "components/omnibox/autocomplete_input.h"
#include "components/omnibox/autocomplete_match.h"
diff --git a/chrome/browser/autocomplete/zero_suggest_provider.h b/chrome/browser/autocomplete/zero_suggest_provider.h
index 5080ddc..9fef477 100644
--- a/chrome/browser/autocomplete/zero_suggest_provider.h
+++ b/chrome/browser/autocomplete/zero_suggest_provider.h
@@ -12,7 +12,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "components/metrics/proto/omnibox_event.pb.h"
#include "components/omnibox/base_search_provider.h"
#include "components/omnibox/search_provider.h"
diff --git a/chrome/browser/custom_home_pages_table_model.h b/chrome/browser/custom_home_pages_table_model.h
index be6e7ec..921604c 100644
--- a/chrome/browser/custom_home_pages_table_model.h
+++ b/chrome/browser/custom_home_pages_table_model.h
@@ -10,7 +10,7 @@
#include "base/compiler_specific.h"
#include "base/task/cancelable_task_tracker.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "ui/base/models/table_model.h"
class GURL;
diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc
index ebfaf26..3a7811e 100644
--- a/chrome/browser/download/download_target_determiner_unittest.cc
+++ b/chrome/browser/download/download_target_determiner_unittest.cc
@@ -19,11 +19,11 @@
#include "chrome/browser/download/download_target_info.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_pref_service_syncable.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/extensions/api/history/history_api.cc b/chrome/browser/extensions/api/history/history_api.cc
index dfedb0d..0d7cd45 100644
--- a/chrome/browser/extensions/api/history/history_api.cc
+++ b/chrome/browser/extensions/api/history/history_api.cc
@@ -22,11 +22,11 @@
#include "chrome/browser/extensions/activity_log/activity_log.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/api/history.h"
#include "chrome/common/pref_names.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "extensions/browser/event_router.h"
diff --git a/chrome/browser/extensions/api/top_sites/top_sites_api.h b/chrome/browser/extensions/api/top_sites/top_sites_api.h
index 21440a1..7519fd9 100644
--- a/chrome/browser/extensions/api/top_sites/top_sites_api.h
+++ b/chrome/browser/extensions/api/top_sites/top_sites_api.h
@@ -7,7 +7,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/extensions/chrome_extension_function.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
namespace extensions {
diff --git a/chrome/browser/history/android/android_cache_database.h b/chrome/browser/history/android/android_cache_database.h
index 3fb977b..c0ae941 100644
--- a/chrome/browser/history/android/android_cache_database.h
+++ b/chrome/browser/history/android/android_cache_database.h
@@ -8,7 +8,7 @@
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/time/time.h"
-#include "chrome/browser/history/android/android_history_types.h"
+#include "components/history/core/android/android_history_types.h"
#include "sql/connection.h"
#include "sql/init_status.h"
diff --git a/chrome/browser/history/android/android_history_provider_service.h b/chrome/browser/history/android/android_history_provider_service.h
index d25a0cd..a3f16af 100644
--- a/chrome/browser/history/android/android_history_provider_service.h
+++ b/chrome/browser/history/android/android_history_provider_service.h
@@ -8,7 +8,7 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/task/cancelable_task_tracker.h"
-#include "chrome/browser/history/android/android_history_types.h"
+#include "components/history/core/android/android_history_types.h"
#include "sql/statement.h"
class Profile;
diff --git a/chrome/browser/history/android/android_history_provider_service_unittest.cc b/chrome/browser/history/android/android_history_provider_service_unittest.cc
index 51c4186..bf2202c 100644
--- a/chrome/browser/history/android/android_history_provider_service_unittest.cc
+++ b/chrome/browser/history/android/android_history_provider_service_unittest.cc
@@ -8,12 +8,12 @@
#include "base/task/cancelable_task_tracker.h"
#include "base/time/time.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
-#include "chrome/browser/history/android/android_history_types.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
+#include "components/history/core/android/android_history_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/history/android/android_provider_backend.h b/chrome/browser/history/android/android_provider_backend.h
index 62acfe7..bc9552d 100644
--- a/chrome/browser/history/android/android_provider_backend.h
+++ b/chrome/browser/history/android/android_provider_backend.h
@@ -15,10 +15,10 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "chrome/browser/history/android/android_cache_database.h"
-#include "chrome/browser/history/android/android_history_types.h"
#include "chrome/browser/history/android/sql_handler.h"
#include "chrome/browser/history/history_backend.h"
#include "chrome/browser/history/history_notifications.h"
+#include "components/history/core/android/android_history_types.h"
#include "sql/statement.h"
#include "sql/transaction.h"
diff --git a/chrome/browser/history/android/android_urls_database.h b/chrome/browser/history/android/android_urls_database.h
index fda6354..b1d071b 100644
--- a/chrome/browser/history/android/android_urls_database.h
+++ b/chrome/browser/history/android/android_urls_database.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_HISTORY_ANDROID_ANDROID_URLS_DATABASE_H_
#define CHROME_BROWSER_HISTORY_ANDROID_ANDROID_URLS_DATABASE_H_
-#include "chrome/browser/history/android/android_history_types.h"
+#include "components/history/core/android/android_history_types.h"
namespace history {
diff --git a/chrome/browser/history/android/sql_handler.h b/chrome/browser/history/android/sql_handler.h
index 43c57ee..dd6ec62 100644
--- a/chrome/browser/history/android/sql_handler.h
+++ b/chrome/browser/history/android/sql_handler.h
@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_HISTORY_ANDROID_SQL_HANDLER_H_
#define CHROME_BROWSER_HISTORY_ANDROID_SQL_HANDLER_H_
-#include "chrome/browser/history/android/android_history_types.h"
+#include "components/history/core/android/android_history_types.h"
namespace history {
diff --git a/chrome/browser/history/android/sqlite_cursor.cc b/chrome/browser/history/android/sqlite_cursor.cc
index 1b53624..b255385 100644
--- a/chrome/browser/history/android/sqlite_cursor.cc
+++ b/chrome/browser/history/android/sqlite_cursor.cc
@@ -10,7 +10,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "chrome/browser/favicon/favicon_service.h"
-#include "chrome/browser/history/android/android_history_types.h"
+#include "components/history/core/android/android_history_types.h"
#include "content/public/browser/browser_thread.h"
#include "jni/SQLiteCursor_jni.h"
#include "sql/statement.h"
diff --git a/chrome/browser/history/android/sqlite_cursor.h b/chrome/browser/history/android/sqlite_cursor.h
index 48edc67..c53e109 100644
--- a/chrome/browser/history/android/sqlite_cursor.h
+++ b/chrome/browser/history/android/sqlite_cursor.h
@@ -16,8 +16,8 @@
#include "base/synchronization/waitable_event.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/history/android/android_history_provider_service.h"
-#include "chrome/browser/history/history_types.h"
#include "components/favicon_base/favicon_callback.h"
+#include "components/history/core/browser/history_types.h"
class FaviconService;
diff --git a/chrome/browser/history/android/sqlite_cursor_unittest.cc b/chrome/browser/history/android/sqlite_cursor_unittest.cc
index 4c26105..f113c1d 100644
--- a/chrome/browser/history/android/sqlite_cursor_unittest.cc
+++ b/chrome/browser/history/android/sqlite_cursor_unittest.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/favicon/chrome_favicon_client_factory.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/history/android/android_history_provider_service.h"
-#include "chrome/browser/history/android/android_history_types.h"
#include "chrome/browser/history/android/android_time.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
@@ -26,6 +25,7 @@
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
+#include "components/history/core/android/android_history_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread.h"
#include "content/public/test/test_utils.h"
diff --git a/chrome/browser/history/download_database.cc b/chrome/browser/history/download_database.cc
index 4fa418e..9461e45 100644
--- a/chrome/browser/history/download_database.cc
+++ b/chrome/browser/history/download_database.cc
@@ -18,7 +18,7 @@
#include "base/time/time.h"
#include "build/build_config.h"
#include "chrome/browser/history/download_row.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/browser/download_item.h"
#include "sql/statement.h"
diff --git a/chrome/browser/history/expire_history_backend.h b/chrome/browser/history/expire_history_backend.h
index 3cb8e80..c4519f6 100644
--- a/chrome/browser/history/expire_history_backend.h
+++ b/chrome/browser/history/expire_history_backend.h
@@ -14,7 +14,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
class GURL;
class TestingProfile;
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index 293595c..b6ac8b9 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -19,15 +19,15 @@
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/history/expire_history_backend.h"
#include "chrome/browser/history/history_database.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/thumbnail_database.h"
#include "chrome/browser/history/visit_tracker.h"
+#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/keyword_id.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
#include "sql/init_status.h"
#if defined(OS_ANDROID)
-#include "chrome/browser/history/android/android_history_types.h"
+#include "components/history/core/android/android_history_types.h"
#endif
class HistoryURLProvider;
diff --git a/chrome/browser/history/history_notifications.h b/chrome/browser/history/history_notifications.h
index 3386b2f..ca5cba8 100644
--- a/chrome/browser/history/history_notifications.h
+++ b/chrome/browser/history/history_notifications.h
@@ -10,7 +10,7 @@
#include <set>
#include "chrome/browser/history/history_details.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/keyword_id.h"
#include "url/gurl.h"
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index 4c61734..81e10d3 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -35,7 +35,6 @@
#include "chrome/browser/history/download_row.h"
#include "chrome/browser/history/history_backend.h"
#include "chrome/browser/history/history_notifications.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_history_backend.h"
#include "chrome/browser/history/in_memory_url_index.h"
#include "chrome/browser/history/top_sites.h"
@@ -51,6 +50,7 @@
#include "chrome/common/url_constants.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/history/core/browser/history_client.h"
+#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/in_memory_database.h"
#include "components/history/core/browser/keyword_search_term.h"
#include "components/history/core/common/thumbnail_score.h"
diff --git a/chrome/browser/history/history_types.cc b/chrome/browser/history/history_types.cc
deleted file mode 100644
index 5e733cc..0000000
--- a/chrome/browser/history/history_types.cc
+++ /dev/null
@@ -1,84 +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_types.h"
-
-#include <limits>
-
-#include "base/logging.h"
-#include "base/stl_util.h"
-
-namespace history {
-
-// VisitRow --------------------------------------------------------------------
-
-VisitRow::VisitRow()
- : visit_id(0),
- url_id(0),
- referring_visit(0),
- transition(ui::PAGE_TRANSITION_LINK),
- segment_id(0) {
-}
-
-VisitRow::VisitRow(URLID arg_url_id,
- base::Time arg_visit_time,
- VisitID arg_referring_visit,
- ui::PageTransition arg_transition,
- SegmentID arg_segment_id)
- : visit_id(0),
- url_id(arg_url_id),
- visit_time(arg_visit_time),
- referring_visit(arg_referring_visit),
- transition(arg_transition),
- segment_id(arg_segment_id) {
-}
-
-VisitRow::~VisitRow() {
-}
-
-// QueryURLResult -------------------------------------------------------------
-
-QueryURLResult::QueryURLResult() : success(false) {
-}
-
-QueryURLResult::~QueryURLResult() {
-}
-
-// HistoryAddPageArgs ---------------------------------------------------------
-
-HistoryAddPageArgs::HistoryAddPageArgs()
- : context_id(NULL),
- page_id(0),
- transition(ui::PAGE_TRANSITION_LINK),
- visit_source(SOURCE_BROWSED),
- did_replace_entry(false) {}
-
-HistoryAddPageArgs::HistoryAddPageArgs(
- const GURL& url,
- base::Time time,
- ContextID context_id,
- int32 page_id,
- const GURL& referrer,
- const history::RedirectList& redirects,
- ui::PageTransition transition,
- VisitSource source,
- bool did_replace_entry)
- : url(url),
- time(time),
- context_id(context_id),
- page_id(page_id),
- referrer(referrer),
- redirects(redirects),
- transition(transition),
- visit_source(source),
- did_replace_entry(did_replace_entry) {
-}
-
-HistoryAddPageArgs::~HistoryAddPageArgs() {}
-
-// VisitDatabaseObserver -------------------------------------------------------
-
-VisitDatabaseObserver::~VisitDatabaseObserver() {}
-
-} // namespace history
diff --git a/chrome/browser/history/history_types.h b/chrome/browser/history/history_types.h
deleted file mode 100644
index c50856b..0000000
--- a/chrome/browser/history/history_types.h
+++ /dev/null
@@ -1,142 +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.
-
-#ifndef CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_
-#define CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_
-
-#include "components/history/core/browser/history_types.h"
-#include "ui/base/page_transition_types.h"
-
-namespace content {
-class WebContents;
-}
-
-namespace history {
-
-// Identifier for a context to scope page ids. (ContextIDs are used in
-// comparisons only and are never dereferenced.)
-// NB: The use of WebContents here is temporary; when the dependency on content
-// is broken, some other type will take its place.
-typedef content::WebContents* ContextID;
-
-// VisitRow -------------------------------------------------------------------
-
-// Holds all information associated with a specific visit. A visit holds time
-// and referrer information for one time a URL is visited.
-class VisitRow {
- public:
- VisitRow();
- VisitRow(URLID arg_url_id,
- base::Time arg_visit_time,
- VisitID arg_referring_visit,
- ui::PageTransition arg_transition,
- SegmentID arg_segment_id);
- ~VisitRow();
-
- // ID of this row (visit ID, used a a referrer for other visits).
- VisitID visit_id;
-
- // Row ID into the URL table of the URL that this page is.
- URLID url_id;
-
- base::Time visit_time;
-
- // Indicates another visit that was the referring page for this one.
- // 0 indicates no referrer.
- VisitID referring_visit;
-
- // A combination of bits from PageTransition.
- ui::PageTransition transition;
-
- // The segment id (see visitsegment_database.*).
- // If 0, the segment id is null in the table.
- SegmentID segment_id;
-
- // Record how much time a user has this visit starting from the user
- // opened this visit to the user closed or ended this visit.
- // This includes both active and inactive time as long as
- // the visit was present.
- base::TimeDelta visit_duration;
-
- // Compares two visits based on dates, for sorting.
- bool operator<(const VisitRow& other) {
- return visit_time < other.visit_time;
- }
-
- // We allow the implicit copy constuctor and operator=.
-};
-
-// We pass around vectors of visits a lot
-typedef std::vector<VisitRow> VisitVector;
-
-// The basic information associated with a visit (timestamp, type of visit),
-// used by HistoryBackend::AddVisits() to create new visits for a URL.
-typedef std::pair<base::Time, ui::PageTransition> VisitInfo;
-
-// QueryURLResult -------------------------------------------------------------
-
-// QueryURLResult encapsulates the result of a call to HistoryBackend::QueryURL.
-struct QueryURLResult {
- QueryURLResult();
- ~QueryURLResult();
-
- // Indicates whether the call to HistoryBackend::QueryURL was successfull
- // or not. If false, then both |row| and |visits| fields are undefined.
- bool success;
- URLRow row;
- VisitVector visits;
-};
-
-// Navigation -----------------------------------------------------------------
-
-// Marshalling structure for AddPage.
-struct HistoryAddPageArgs {
- // The default constructor is equivalent to:
- //
- // HistoryAddPageArgs(
- // GURL(), base::Time(), NULL, 0, GURL(),
- // history::RedirectList(), ui::PAGE_TRANSITION_LINK,
- // SOURCE_BROWSED, false)
- HistoryAddPageArgs();
- HistoryAddPageArgs(const GURL& url,
- base::Time time,
- ContextID context_id,
- int32 page_id,
- const GURL& referrer,
- const history::RedirectList& redirects,
- ui::PageTransition transition,
- VisitSource source,
- bool did_replace_entry);
- ~HistoryAddPageArgs();
-
- GURL url;
- base::Time time;
-
- ContextID context_id;
- int32 page_id;
-
- GURL referrer;
- history::RedirectList redirects;
- ui::PageTransition transition;
- VisitSource visit_source;
- bool did_replace_entry;
-};
-
-// Abbreviated information about a visit.
-struct BriefVisitInfo {
- URLID url_id;
- base::Time time;
- ui::PageTransition transition;
-};
-
-// An observer of VisitDatabase.
-class VisitDatabaseObserver {
- public:
- virtual ~VisitDatabaseObserver();
- virtual void OnAddVisit(const BriefVisitInfo& info) = 0;
-};
-
-} // namespace history
-
-#endif // CHROME_BROWSER_HISTORY_HISTORY_TYPES_H_
diff --git a/chrome/browser/history/in_memory_url_index.h b/chrome/browser/history/in_memory_url_index.h
index 43b1595..6399dcb 100644
--- a/chrome/browser/history/in_memory_url_index.h
+++ b/chrome/browser/history/in_memory_url_index.h
@@ -19,9 +19,9 @@
#include "base/strings/string16.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/history/history_db_task.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_url_index_types.h"
#include "chrome/browser/history/scored_history_match.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "sql/connection.h"
diff --git a/chrome/browser/history/in_memory_url_index_types.h b/chrome/browser/history/in_memory_url_index_types.h
index 4191036..bd23160 100644
--- a/chrome/browser/history/in_memory_url_index_types.h
+++ b/chrome/browser/history/in_memory_url_index_types.h
@@ -10,7 +10,7 @@
#include <vector>
#include "base/strings/string16.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "url/gurl.h"
namespace history {
diff --git a/chrome/browser/history/scored_history_match.h b/chrome/browser/history/scored_history_match.h
index 2b2cf7e..eb8f4cb 100644
--- a/chrome/browser/history/scored_history_match.h
+++ b/chrome/browser/history/scored_history_match.h
@@ -10,9 +10,9 @@
#include <vector>
#include "base/strings/string16.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/in_memory_url_index_types.h"
#include "components/history/core/browser/history_match.h"
+#include "components/history/core/browser/history_types.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
namespace history {
diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h
index 72c8901..14942f1 100644
--- a/chrome/browser/history/thumbnail_database.h
+++ b/chrome/browser/history/thumbnail_database.h
@@ -9,7 +9,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "sql/connection.h"
#include "sql/init_status.h"
#include "sql/meta_table.h"
diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h
index d8f9c29..ea5dce4 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -10,7 +10,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/history/history_service.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/top_sites_observer.h"
#include "components/history/core/common/thumbnail_score.h"
#include "third_party/skia/include/core/SkColor.h"
diff --git a/chrome/browser/history/top_sites_backend.h b/chrome/browser/history/top_sites_backend.h
index 3865e4b..51700c9 100644
--- a/chrome/browser/history/top_sites_backend.h
+++ b/chrome/browser/history/top_sites_backend.h
@@ -9,7 +9,7 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
namespace base {
class CancelableTaskTracker;
diff --git a/chrome/browser/history/top_sites_cache.h b/chrome/browser/history/top_sites_cache.h
index 1269d3b..de3ee6d 100644
--- a/chrome/browser/history/top_sites_cache.h
+++ b/chrome/browser/history/top_sites_cache.h
@@ -9,8 +9,8 @@
#include <utility>
#include "base/memory/ref_counted.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/url_utils.h"
+#include "components/history/core/browser/history_types.h"
#include "url/gurl.h"
class GURL;
diff --git a/chrome/browser/history/top_sites_database.cc b/chrome/browser/history/top_sites_database.cc
index c258db3..1fe4c25 100644
--- a/chrome/browser/history/top_sites_database.cc
+++ b/chrome/browser/history/top_sites_database.cc
@@ -9,8 +9,8 @@
#include "base/metrics/histogram.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/top_sites.h"
+#include "components/history/core/browser/history_types.h"
#include "components/history/core/common/thumbnail_score.h"
#include "sql/connection.h"
#include "sql/recovery.h"
diff --git a/chrome/browser/history/top_sites_database.h b/chrome/browser/history/top_sites_database.h
index 9659d2a..0a86936 100644
--- a/chrome/browser/history/top_sites_database.h
+++ b/chrome/browser/history/top_sites_database.h
@@ -9,7 +9,7 @@
#include <string>
#include "base/gtest_prod_util.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "sql/meta_table.h"
namespace base {
diff --git a/chrome/browser/history/top_sites_database_unittest.cc b/chrome/browser/history/top_sites_database_unittest.cc
index 9ec6719..b5bbbb2 100644
--- a/chrome/browser/history/top_sites_database_unittest.cc
+++ b/chrome/browser/history/top_sites_database_unittest.cc
@@ -8,10 +8,10 @@
#include "base/files/scoped_temp_dir.h"
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/top_sites_database.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/tools/profiles/thumbnail-inl.h"
+#include "components/history/core/browser/history_types.h"
#include "sql/connection.h"
#include "sql/recovery.h"
#include "sql/test/scoped_error_ignorer.h"
diff --git a/chrome/browser/history/top_sites_impl.h b/chrome/browser/history/top_sites_impl.h
index 23702e0..28d8c0c 100644
--- a/chrome/browser/history/top_sites_impl.h
+++ b/chrome/browser/history/top_sites_impl.h
@@ -20,9 +20,9 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "chrome/browser/history/history_service.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/history/top_sites_backend.h"
+#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/page_usage_data.h"
#include "components/history/core/common/thumbnail_score.h"
#include "third_party/skia/include/core/SkColor.h"
diff --git a/chrome/browser/history/top_sites_impl_unittest.cc b/chrome/browser/history/top_sites_impl_unittest.cc
index 7afd738..aa4b0bc 100644
--- a/chrome/browser/history/top_sites_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_impl_unittest.cc
@@ -12,7 +12,6 @@
#include "chrome/browser/history/history_db_task.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/history_unittest_base.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/history/top_sites_cache.h"
@@ -20,6 +19,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/history/typed_url_syncable_service.h b/chrome/browser/history/typed_url_syncable_service.h
index c1b835f..02dff54 100644
--- a/chrome/browser/history/typed_url_syncable_service.h
+++ b/chrome/browser/history/typed_url_syncable_service.h
@@ -9,7 +9,7 @@
#include <vector>
#include "chrome/browser/history/history_notifications.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "sync/api/sync_change.h"
#include "sync/api/sync_data.h"
#include "sync/api/sync_error.h"
diff --git a/chrome/browser/history/typed_url_syncable_service_unittest.cc b/chrome/browser/history/typed_url_syncable_service_unittest.cc
index 8f3b912..77069cd 100644
--- a/chrome/browser/history/typed_url_syncable_service_unittest.cc
+++ b/chrome/browser/history/typed_url_syncable_service_unittest.cc
@@ -9,7 +9,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/history/history_backend.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_types.h"
#include "sync/api/fake_sync_change_processor.h"
#include "sync/api/sync_change_processor_wrapper_for_test.h"
diff --git a/chrome/browser/history/visit_database.h b/chrome/browser/history/visit_database.h
index b8a175e..8f50848 100644
--- a/chrome/browser/history/visit_database.h
+++ b/chrome/browser/history/visit_database.h
@@ -7,7 +7,7 @@
#include <vector>
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
namespace sql {
class Connection;
diff --git a/chrome/browser/history/visit_filter.cc b/chrome/browser/history/visit_filter.cc
index 0a5ab74..9147dd73 100644
--- a/chrome/browser/history/visit_filter.cc
+++ b/chrome/browser/history/visit_filter.cc
@@ -10,7 +10,7 @@
#include "base/logging.h"
#include "base/time/time.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
namespace history {
diff --git a/chrome/browser/history/visit_filter_unittest.cc b/chrome/browser/history/visit_filter_unittest.cc
index f100ad7..8953d75 100644
--- a/chrome/browser/history/visit_filter_unittest.cc
+++ b/chrome/browser/history/visit_filter_unittest.cc
@@ -8,7 +8,7 @@
#include "base/logging.h"
#include "base/time/time.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
diff --git a/chrome/browser/history/visit_tracker.h b/chrome/browser/history/visit_tracker.h
index 00b0c46..890a889 100644
--- a/chrome/browser/history/visit_tracker.h
+++ b/chrome/browser/history/visit_tracker.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/basictypes.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
namespace history {
diff --git a/chrome/browser/history/visitsegment_database.h b/chrome/browser/history/visitsegment_database.h
index b224288..2302978 100644
--- a/chrome/browser/history/visitsegment_database.h
+++ b/chrome/browser/history/visitsegment_database.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H_
#include "base/basictypes.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
class PageUsageData;
diff --git a/chrome/browser/history/web_history_service.h b/chrome/browser/history/web_history_service.h
index 119b6e9..2e7c7e9 100644
--- a/chrome/browser/history/web_history_service.h
+++ b/chrome/browser/history/web_history_service.h
@@ -8,8 +8,8 @@
#include <set>
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
+#include "components/history/core/browser/history_types.h"
#include "components/keyed_service/core/keyed_service.h"
namespace base {
diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h
index 300f398..1cdab73 100644
--- a/chrome/browser/importer/external_process_importer_client.h
+++ b/chrome/browser/importer/external_process_importer_client.h
@@ -12,10 +12,10 @@
#include "base/compiler_specific.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/common/importer/importer_autofill_form_data_entry.h"
#include "chrome/common/importer/importer_data_types.h"
#include "chrome/common/importer/importer_url_row.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/utility_process_host_client.h"
diff --git a/chrome/browser/importer/profile_writer.h b/chrome/browser/importer/profile_writer.h
index 6adea3c..1c74ec9 100644
--- a/chrome/browser/importer/profile_writer.h
+++ b/chrome/browser/importer/profile_writer.h
@@ -13,7 +13,7 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "build/build_config.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "url/gurl.h"
struct ImportedBookmarkEntry;
diff --git a/chrome/browser/importer/profile_writer_unittest.cc b/chrome/browser/importer/profile_writer_unittest.cc
index b2d7580..743d1a7 100644
--- a/chrome/browser/importer/profile_writer_unittest.cc
+++ b/chrome/browser/importer/profile_writer_unittest.cc
@@ -11,7 +11,6 @@
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/importer/importer_unittest_utils.h"
#include "chrome/common/importer/imported_bookmark_entry.h"
#include "chrome/test/base/testing_profile.h"
@@ -19,6 +18,7 @@
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_utils.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
index 58dd7f1..854ab6b 100644
--- a/chrome/browser/jumplist_win.h
+++ b/chrome/browser/jumplist_win.h
@@ -15,11 +15,11 @@
#include "base/synchronization/lock.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/history/history_service.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/jumplist_updater_win.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/browser_thread.h"
namespace chrome {
diff --git a/chrome/browser/notifications/message_center_settings_controller.cc b/chrome/browser/notifications/message_center_settings_controller.cc
index ee98b83..af43b14 100644
--- a/chrome/browser/notifications/message_center_settings_controller.cc
+++ b/chrome/browser/notifications/message_center_settings_controller.cc
@@ -17,7 +17,6 @@
#include "chrome/browser/extensions/app_icon_loader_impl.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/notifications/desktop_notification_profile_util.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
@@ -29,6 +28,7 @@
#include "chrome/common/extensions/api/notifications.h"
#include "chrome/common/extensions/extension_constants.h"
#include "components/favicon_base/favicon_types.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "extensions/browser/event_router.h"
diff --git a/chrome/browser/precache/most_visited_urls_provider.cc b/chrome/browser/precache/most_visited_urls_provider.cc
index 0eefd8a..37ec553 100644
--- a/chrome/browser/precache/most_visited_urls_provider.cc
+++ b/chrome/browser/precache/most_visited_urls_provider.cc
@@ -7,8 +7,8 @@
#include <list>
#include "base/bind.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/top_sites.h"
+#include "components/history/core/browser/history_types.h"
#include "url/gurl.h"
using history::MostVisitedURLList;
diff --git a/chrome/browser/predictors/autocomplete_action_predictor.h b/chrome/browser/predictors/autocomplete_action_predictor.h
index a41c5a8..c80eae6 100644
--- a/chrome/browser/predictors/autocomplete_action_predictor.h
+++ b/chrome/browser/predictors/autocomplete_action_predictor.h
@@ -12,8 +12,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/predictors/autocomplete_action_predictor_table.h"
+#include "components/history/core/browser/history_types.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.h b/chrome/browser/predictors/resource_prefetch_predictor.h
index 5e6157b..e82384f 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor.h
+++ b/chrome/browser/predictors/resource_prefetch_predictor.h
@@ -15,10 +15,10 @@
#include "base/memory/weak_ptr.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/time/time.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/predictors/resource_prefetch_common.h"
#include "chrome/browser/predictors/resource_prefetch_predictor_tables.h"
#include "chrome/browser/predictors/resource_prefetcher.h"
+#include "components/history/core/browser/history_types.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
index 6e79971..ed9df65 100644
--- a/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
+++ b/chrome/browser/predictors/resource_prefetch_predictor_unittest.cc
@@ -10,10 +10,10 @@
#include "base/time/time.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/predictors/resource_prefetch_predictor.h"
#include "chrome/browser/predictors/resource_prefetch_predictor_tables.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/test/test_browser_thread.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index ae70ddc..383f44a 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -12,7 +12,6 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/history/history_tab_helper.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/prerender/prerender_field_trial.h"
#include "chrome/browser/prerender/prerender_final_status.h"
#include "chrome/browser/prerender/prerender_handle.h"
@@ -27,6 +26,7 @@
#include "chrome/common/prerender_messages.h"
#include "chrome/common/render_messages.h"
#include "chrome/common/url_constants.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/browser_child_process_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc
index 4bb6e5d..ca108dac 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc
@@ -15,12 +15,12 @@
#include "base/time/time.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/browser_features.h"
#include "chrome/browser/safe_browsing/client_side_detection_host.h"
#include "chrome/browser/safe_browsing/database_manager.h"
#include "chrome/common/safe_browsing/csd.pb.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.h b/chrome/browser/safe_browsing/browser_feature_extractor.h
index ef8f3ff..cab0471 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.h
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.h
@@ -22,9 +22,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/time/time.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/common/resource_type.h"
#include "url/gurl.h"
diff --git a/chrome/browser/search/instant_service.h b/chrome/browser/search/instant_service.h
index c93a177..d636733 100644
--- a/chrome/browser/search/instant_service.h
+++ b/chrome/browser/search/instant_service.h
@@ -11,7 +11,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/search_engines/template_url_service_observer.h"
#include "content/public/browser/notification_observer.h"
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
index a24949b..d601f4f 100644
--- a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
+++ b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
@@ -10,7 +10,6 @@
#include "base/strings/string_util.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/supervised_user/supervised_user_interstitial.h"
@@ -20,6 +19,7 @@
#include "chrome/browser/supervised_user/supervised_user_url_filter.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/grit/generated_resources.h"
+#include "components/history/core/browser/history_types.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/infobars/core/infobar.h"
#include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/sync/glue/favicon_cache.cc b/chrome/browser/sync/glue/favicon_cache.cc
index ecd7e1d..f591fe4 100644
--- a/chrome/browser/sync/glue/favicon_cache.cc
+++ b/chrome/browser/sync/glue/favicon_cache.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/history_notifications.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "sync/api/time.h"
diff --git a/chrome/browser/sync/glue/favicon_cache.h b/chrome/browser/sync/glue/favicon_cache.h
index d3bd71c..c2597f5 100644
--- a/chrome/browser/sync/glue/favicon_cache.h
+++ b/chrome/browser/sync/glue/favicon_cache.h
@@ -16,7 +16,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/task/cancelable_task_tracker.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "components/sessions/session_id.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
diff --git a/chrome/browser/sync/glue/typed_url_model_associator.h b/chrome/browser/sync/glue/typed_url_model_associator.h
index ebb8914..9357940 100644
--- a/chrome/browser/sync/glue/typed_url_model_associator.h
+++ b/chrome/browser/sync/glue/typed_url_model_associator.h
@@ -13,7 +13,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/strings/string16.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "components/sync_driver/data_type_error_handler.h"
#include "components/sync_driver/model_associator.h"
#include "sync/protocol/typed_url_specifics.pb.h"
diff --git a/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc b/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc
index 87c5742..89b8f1f 100644
--- a/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc
+++ b/chrome/browser/sync/glue/typed_url_model_associator_unittest.cc
@@ -9,9 +9,9 @@
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
#include "base/time/time.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/sync/glue/typed_url_model_associator.h"
#include "chrome/browser/sync/profile_sync_service_mock.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "sync/protocol/typed_url_specifics.pb.h"
diff --git a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
index 2fe0476..238874b 100644
--- a/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_typed_url_unittest.cc
@@ -23,7 +23,6 @@
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/invalidation/fake_invalidation_service.h"
#include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
#include "chrome/browser/prefs/pref_service_syncable.h"
@@ -45,6 +44,7 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
+#include "components/history/core/browser/history_types.h"
#include "components/invalidation/invalidation_service.h"
#include "components/invalidation/profile_invalidation_provider.h"
#include "components/keyed_service/content/refcounted_browser_context_keyed_service.h"
diff --git a/chrome/browser/sync/test/integration/bookmarks_helper.cc b/chrome/browser/sync/test/integration/bookmarks_helper.cc
index 843b981..0cc3adc 100644
--- a/chrome/browser/sync/test/integration/bookmarks_helper.cc
+++ b/chrome/browser/sync/test/integration/bookmarks_helper.cc
@@ -22,7 +22,6 @@
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/history_db_task.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/glue/bookmark_change_processor.h"
#include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
@@ -36,6 +35,7 @@
#include "components/bookmarks/browser/bookmark_model_observer.h"
#include "components/bookmarks/browser/bookmark_utils.h"
#include "components/favicon_base/favicon_util.h"
+#include "components/history/core/browser/history_types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/models/tree_node_iterator.h"
diff --git a/chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc b/chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc
index abf2357..d401f2e 100644
--- a/chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc
+++ b/chrome/browser/sync/test/integration/multiple_client_typed_urls_sync_test.cc
@@ -5,11 +5,11 @@
#include "base/i18n/number_formatting.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/typed_urls_helper.h"
+#include "components/history/core/browser/history_types.h"
using typed_urls_helper::AddUrlToHistory;
using typed_urls_helper::AwaitCheckAllProfilesHaveSameURLsAsVerifier;
diff --git a/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc b/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
index 22f295f..1349fd4 100644
--- a/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_sessions_sync_test.cc
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "base/memory/scoped_vector.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sessions/session_types.h"
#include "chrome/browser/sync/profile_sync_service.h"
@@ -11,6 +10,7 @@
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/typed_urls_helper.h"
+#include "components/history/core/browser/history_types.h"
#include "sync/util/time.h"
using sessions_helper::CheckInitialState;
diff --git a/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc b/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc
index 1aa615e..9d922a2 100644
--- a/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_typed_urls_sync_test.cc
@@ -3,12 +3,12 @@
// found in the LICENSE file.
#include "base/memory/scoped_vector.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/typed_urls_helper.h"
+#include "components/history/core/browser/history_types.h"
using sync_integration_test_util::AwaitCommitActivityCompletion;
using typed_urls_helper::AddUrlToHistory;
diff --git a/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc b/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc
index bdbf16b..e45c0bc 100644
--- a/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_typed_urls_sync_test.cc
@@ -5,13 +5,13 @@
#include "base/i18n/number_formatting.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/sessions/session_service.h"
#include "chrome/browser/sync/test/integration/bookmarks_helper.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "chrome/browser/sync/test/integration/typed_urls_helper.h"
+#include "components/history/core/browser/history_types.h"
using base::ASCIIToUTF16;
using sync_integration_test_util::AwaitCommitActivityCompletion;
diff --git a/chrome/browser/sync/test/integration/typed_urls_helper.cc b/chrome/browser/sync/test/integration/typed_urls_helper.cc
index 027a6fc..d94d540 100644
--- a/chrome/browser/sync/test/integration/typed_urls_helper.cc
+++ b/chrome/browser/sync/test/integration/typed_urls_helper.cc
@@ -13,11 +13,11 @@
#include "chrome/browser/history/history_db_task.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
+#include "components/history/core/browser/history_types.h"
using sync_datatype_helper::test;
diff --git a/chrome/browser/sync/test/integration/typed_urls_helper.h b/chrome/browser/sync/test/integration/typed_urls_helper.h
index 429b96c..d570aa2 100644
--- a/chrome/browser/sync/test/integration/typed_urls_helper.h
+++ b/chrome/browser/sync/test/integration/typed_urls_helper.h
@@ -7,7 +7,7 @@
#include <vector>
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "ui/base/page_transition_types.h"
namespace base {
diff --git a/chrome/browser/thumbnails/thumbnail_list_source.h b/chrome/browser/thumbnails/thumbnail_list_source.h
index 5eca3ec..fef25dd 100644
--- a/chrome/browser/thumbnails/thumbnail_list_source.h
+++ b/chrome/browser/thumbnails/thumbnail_list_source.h
@@ -10,7 +10,7 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/url_data_source.h"
class Profile;
diff --git a/chrome/browser/ui/android/navigation_popup.cc b/chrome/browser/ui/android/navigation_popup.cc
index 877bbac..48876a5 100644
--- a/chrome/browser/ui/android/navigation_popup.cc
+++ b/chrome/browser/ui/android/navigation_popup.cc
@@ -10,10 +10,10 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/url_constants.h"
+#include "components/history/core/browser/history_types.h"
#include "jni/NavigationPopup_jni.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/resource/resource_bundle.h"
diff --git a/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm b/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm
index e2adc9a..109fb60 100644
--- a/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/history_menu_cocoa_controller.mm
@@ -8,7 +8,6 @@
#include "chrome/app/chrome_command_ids.h" // IDC_HISTORY_MENU
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/history/history_service.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_factory.h"
@@ -17,6 +16,7 @@
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_tab_restore_service_delegate.h"
#include "chrome/browser/ui/host_desktop.h"
+#include "components/history/core/browser/history_types.h"
#import "ui/base/cocoa/cocoa_base_utils.h"
#include "ui/base/window_open_disposition.h"
diff --git a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
index 7b9b9131..bed2ab1 100644
--- a/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
+++ b/chrome/browser/ui/search/instant_extended_interactive_uitest.cc
@@ -24,7 +24,6 @@
#include "chrome/browser/history/history_db_task.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/instant_service.h"
@@ -53,6 +52,7 @@
#include "components/bookmarks/browser/bookmark_utils.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
#include "components/google/core/browser/google_url_tracker.h"
+#include "components/history/core/browser/history_types.h"
#include "components/history/core/common/thumbnail_score.h"
#include "components/omnibox/autocomplete_match.h"
#include "components/omnibox/autocomplete_provider.h"
diff --git a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
index d52e989..2852608 100644
--- a/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
+++ b/chrome/browser/ui/sync/profile_signin_confirmation_helper.cc
@@ -14,9 +14,9 @@
#include "chrome/browser/history/history_db_task.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "components/bookmarks/browser/bookmark_model.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/browser_thread.h"
#include "ui/gfx/color_utils.h"
#include "ui/native_theme/native_theme.h"
diff --git a/chrome/browser/ui/views/frame/global_menu_bar_x11.h b/chrome/browser/ui/views/frame/global_menu_bar_x11.h
index 303fdce..711330a 100644
--- a/chrome/browser/ui/views/frame/global_menu_bar_x11.h
+++ b/chrome/browser/ui/views/frame/global_menu_bar_x11.h
@@ -12,9 +12,9 @@
#include "base/memory/weak_ptr.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/command_observer.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ui/base/glib/glib_signal.h"
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index a366974..b0ca30b 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/bookmarks/enhanced_bookmarks_features.h"
#include "chrome/browser/dom_distiller/dom_distiller_service_factory.h"
#include "chrome/browser/favicon/favicon_service.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/webui/about_ui.h"
@@ -62,6 +61,7 @@
#include "components/dom_distiller/webui/dom_distiller_ui.h"
#include "components/favicon_base/favicon_util.h"
#include "components/favicon_base/select_favicon_frames.h"
+#include "components/history/core/browser/history_types.h"
#include "components/password_manager/core/common/password_manager_switches.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc
index f65ddc2..d0b867a 100644
--- a/chrome/browser/ui/webui/history_ui.cc
+++ b/chrome/browser/ui/webui/history_ui.cc
@@ -24,7 +24,6 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/web_history_service.h"
#include "chrome/browser/history/web_history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -41,6 +40,7 @@
#include "chrome/grit/generated_resources.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_utils.h"
+#include "components/history/core/browser/history_types.h"
#include "components/search/search.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.h b/chrome/browser/ui/webui/ntp/most_visited_handler.h
index 91e162b..5be345d 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_handler.h
+++ b/chrome/browser/ui/webui/ntp/most_visited_handler.h
@@ -9,7 +9,7 @@
#include <vector>
#include "base/memory/weak_ptr.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_ui_message_handler.h"
diff --git a/chrome/browser/ui/webui/ntp/suggestions_page_handler.h b/chrome/browser/ui/webui/ntp/suggestions_page_handler.h
index 14e25cd..896d62e 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_page_handler.h
+++ b/chrome/browser/ui/webui/ntp/suggestions_page_handler.h
@@ -7,8 +7,8 @@
#include <string>
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/ui/webui/ntp/suggestions_combiner.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_ui_message_handler.h"
diff --git a/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.h b/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.h
index 45b2911..7985984 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.h
+++ b/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.h
@@ -9,9 +9,9 @@
#include "base/basictypes.h"
#include "base/task/cancelable_task_tracker.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/visit_filter.h"
#include "chrome/browser/ui/webui/ntp/suggestions_source.h"
+#include "components/history/core/browser/history_types.h"
class SuggestionsCombiner;
class Profile;
diff --git a/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h b/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h
index 9ca8cb3..63c156f 100644
--- a/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h
+++ b/chrome/browser/ui/webui/signin/profile_signin_confirmation_dialog.h
@@ -9,9 +9,9 @@
#include "base/callback.h"
#include "base/strings/string16.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
#include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
+#include "components/history/core/browser/history_types.h"
#include "ui/base/ui_base_types.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
diff --git a/chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc b/chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc
index ca9377d..e760e26 100644
--- a/chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc
+++ b/chrome/browser/ui/webui/web_dialog_web_contents_delegate_unittest.cc
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -17,6 +16,7 @@
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/test_browser_window.h"
#include "chrome/test/base/testing_profile.h"
+#include "components/history/core/browser/history_types.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index a61c2c6..e72af42 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -456,8 +456,6 @@
'browser/history/android/android_cache_database.h',
'browser/history/android/android_history_provider_service.cc',
'browser/history/android/android_history_provider_service.h',
- 'browser/history/android/android_history_types.cc',
- 'browser/history/android/android_history_types.h',
'browser/history/android/android_provider_backend.cc',
'browser/history/android/android_provider_backend.h',
'browser/history/android/android_time.h',
@@ -504,8 +502,6 @@
'browser/history/history_service_factory.h',
'browser/history/history_tab_helper.cc',
'browser/history/history_tab_helper.h',
- 'browser/history/history_types.cc',
- 'browser/history/history_types.h',
'browser/history/in_memory_history_backend.cc',
'browser/history/in_memory_history_backend.h',
'browser/history/in_memory_url_index.cc',
@@ -3260,6 +3256,7 @@
'dependencies': [
'../components/components.gyp:cdm_browser',
'../components/components.gyp:enhanced_bookmarks',
+ '../components/components.gyp:history_core_android',
'../components/components.gyp:web_contents_delegate_android',
'../third_party/android_opengl/etc1/etc1.gyp:etc1',
'chrome_browser_jni_headers',
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 2a1e922..b7a6b25 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -446,7 +446,6 @@
'browser/google/google_update_settings_unittest.cc',
'browser/history/android/android_cache_database_unittest.cc',
'browser/history/android/android_history_provider_service_unittest.cc',
- 'browser/history/android/android_history_types_unittest.cc',
'browser/history/android/android_provider_backend_unittest.cc',
'browser/history/android/android_urls_database_unittest.cc',
'browser/history/android/bookmark_model_sql_handler_unittest.cc',
@@ -457,7 +456,6 @@
'browser/history/history_backend_unittest.cc',
'browser/history/history_database_unittest.cc',
'browser/history/history_querying_unittest.cc',
- 'browser/history/history_types_unittest.cc',
'browser/history/history_unittest.cc',
'browser/history/history_unittest_base.cc',
'browser/history/history_unittest_base.h',
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 8d9721b..76044be 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -133,6 +133,8 @@
'gcm_driver/gcm_stats_recorder_impl_unittest.cc',
'google/core/browser/google_url_tracker_unittest.cc',
'google/core/browser/google_util_unittest.cc',
+ 'history/core/android/android_history_types_unittest.cc',
+ 'history/core/browser/history_types_unittest.cc',
'history/core/browser/url_database_unittest.cc',
'history/core/common/thumbnail_score_unittest.cc',
'invalidation/invalidation_logger_unittest.cc',
@@ -616,6 +618,7 @@
],
'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code',
+ 'components.gyp:history_core_android',
],
'dependencies!': [
'components.gyp:feedback_component',
diff --git a/components/history.gypi b/components/history.gypi
index e413d34..c2431f5 100644
--- a/components/history.gypi
+++ b/components/history.gypi
@@ -15,6 +15,7 @@
'../base/base.gyp:base',
'../net/net.gyp:net',
'../sql/sql.gyp:sql',
+ '../ui/base/ui_base.gyp:ui_base',
'../ui/gfx/gfx.gyp:gfx',
'../url/url.gyp:url_lib',
'favicon_base',
@@ -78,4 +79,27 @@
],
},
],
+ 'conditions': [
+ ['OS=="android"', {
+ 'targets': [
+ {
+ # GN version: //components/history/code/android
+ 'target_name': 'history_core_android',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '..',
+ ],
+ 'dependencies': [
+ '../base/base.gyp:base',
+ '../sql/sql.gyp:sql',
+ 'history_core_browser',
+ ],
+ 'sources': [
+ 'history/core/android/android_history_types.cc',
+ 'history/core/android/android_history_types.h',
+ ],
+ },
+ ],
+ }],
+ ],
}
diff --git a/components/history/DEPS b/components/history/DEPS
index 26313ed..28b1e19 100644
--- a/components/history/DEPS
+++ b/components/history/DEPS
@@ -4,5 +4,6 @@ include_rules = [
"+components/query_parser",
"+net",
"+sql",
+ "+ui/base",
"+ui/gfx",
]
diff --git a/components/history/core/android/BUILD.gn b/components/history/core/android/BUILD.gn
new file mode 100644
index 0000000..b49d867
--- /dev/null
+++ b/components/history/core/android/BUILD.gn
@@ -0,0 +1,16 @@
+# Copyright 2014 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.
+
+static_library("android") {
+ sources = [
+ "android_history_types.cc",
+ "android_history_types.h",
+ ]
+
+ deps = [
+ "//base",
+ "//components/history/core/browser",
+ "//sql",
+ ]
+}
diff --git a/chrome/browser/history/android/android_history_types.cc b/components/history/core/android/android_history_types.cc
index b587249..96e7ca3 100644
--- a/chrome/browser/history/android/android_history_types.cc
+++ b/components/history/core/android/android_history_types.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/history/android/android_history_types.h"
+#include "components/history/core/android/android_history_types.h"
namespace history {
diff --git a/chrome/browser/history/android/android_history_types.h b/components/history/core/android/android_history_types.h
index a27b99e..3c642f3 100644
--- a/chrome/browser/history/android/android_history_types.h
+++ b/components/history/core/android/android_history_types.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_ANDROID_ANDROID_HISTORY_TYPES_H_
-#define CHROME_BROWSER_HISTORY_ANDROID_ANDROID_HISTORY_TYPES_H_
+#ifndef COMPONENTS_HISTORY_CORE_ANDROID_ANDROID_HISTORY_TYPES_H_
+#define COMPONENTS_HISTORY_CORE_ANDROID_ANDROID_HISTORY_TYPES_H_
#include <map>
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/keyword_id.h"
#include "sql/statement.h"
@@ -329,4 +329,4 @@ class AndroidStatement {
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_ANDROID_ANDROID_HISTORY_TYPES_H_
+#endif // COMPONENTS_HISTORY_CORE_ANDROID_ANDROID_HISTORY_TYPES_H_
diff --git a/chrome/browser/history/android/android_history_types_unittest.cc b/components/history/core/android/android_history_types_unittest.cc
index ef82030..a3f4e9b 100644
--- a/chrome/browser/history/android/android_history_types_unittest.cc
+++ b/components/history/core/android/android_history_types_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/history/android/android_history_types.h"
+#include "components/history/core/android/android_history_types.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/components/history/core/browser/BUILD.gn b/components/history/core/browser/BUILD.gn
index d619649..18d561e 100644
--- a/components/history/core/browser/BUILD.gn
+++ b/components/history/core/browser/BUILD.gn
@@ -31,6 +31,7 @@ static_library("browser") {
"//components/query_parser",
"//net",
"//sql",
+ "//ui/base",
"//ui/gfx",
]
}
diff --git a/components/history/core/browser/history_types.cc b/components/history/core/browser/history_types.cc
index abcee11..48c19bd 100644
--- a/components/history/core/browser/history_types.cc
+++ b/components/history/core/browser/history_types.cc
@@ -12,6 +12,32 @@
namespace history {
+// VisitRow --------------------------------------------------------------------
+
+VisitRow::VisitRow()
+ : visit_id(0),
+ url_id(0),
+ referring_visit(0),
+ transition(ui::PAGE_TRANSITION_LINK),
+ segment_id(0) {
+}
+
+VisitRow::VisitRow(URLID arg_url_id,
+ base::Time arg_visit_time,
+ VisitID arg_referring_visit,
+ ui::PageTransition arg_transition,
+ SegmentID arg_segment_id)
+ : visit_id(0),
+ url_id(arg_url_id),
+ visit_time(arg_visit_time),
+ referring_visit(arg_referring_visit),
+ transition(arg_transition),
+ segment_id(arg_segment_id) {
+}
+
+VisitRow::~VisitRow() {
+}
+
// QueryResults ----------------------------------------------------------------
QueryResults::QueryResults() : reached_beginning_(false) {
@@ -151,6 +177,14 @@ int QueryOptions::EffectiveMaxCount() const {
return max_count ? max_count : std::numeric_limits<int>::max();
}
+// QueryURLResult -------------------------------------------------------------
+
+QueryURLResult::QueryURLResult() : success(false) {
+}
+
+QueryURLResult::~QueryURLResult() {
+}
+
// MostVisitedURL --------------------------------------------------------------
MostVisitedURL::MostVisitedURL() {}
@@ -203,6 +237,38 @@ TopSitesDelta::TopSitesDelta() {}
TopSitesDelta::~TopSitesDelta() {}
+// HistoryAddPageArgs ---------------------------------------------------------
+
+HistoryAddPageArgs::HistoryAddPageArgs()
+ : context_id(NULL),
+ page_id(0),
+ transition(ui::PAGE_TRANSITION_LINK),
+ visit_source(SOURCE_BROWSED),
+ did_replace_entry(false) {}
+
+HistoryAddPageArgs::HistoryAddPageArgs(
+ const GURL& url,
+ base::Time time,
+ ContextID context_id,
+ int32 page_id,
+ const GURL& referrer,
+ const history::RedirectList& redirects,
+ ui::PageTransition transition,
+ VisitSource source,
+ bool did_replace_entry)
+ : url(url),
+ time(time),
+ context_id(context_id),
+ page_id(page_id),
+ referrer(referrer),
+ redirects(redirects),
+ transition(transition),
+ visit_source(source),
+ did_replace_entry(did_replace_entry) {
+}
+
+HistoryAddPageArgs::~HistoryAddPageArgs() {}
+
// ThumbnailMigration ---------------------------------------------------------
ThumbnailMigration::ThumbnailMigration() {}
@@ -241,6 +307,10 @@ FaviconBitmap::FaviconBitmap()
FaviconBitmap::~FaviconBitmap() {
}
+// VisitDatabaseObserver -------------------------------------------------------
+
+VisitDatabaseObserver::~VisitDatabaseObserver() {}
+
// ExpireHistoryArgs ----------------------------------------------------------
ExpireHistoryArgs::ExpireHistoryArgs() {
diff --git a/components/history/core/browser/history_types.h b/components/history/core/browser/history_types.h
index 05c740a..0301a94 100644
--- a/components/history/core/browser/history_types.h
+++ b/components/history/core/browser/history_types.h
@@ -20,11 +20,17 @@
#include "components/favicon_base/favicon_types.h"
#include "components/history/core/browser/url_row.h"
#include "components/history/core/common/thumbnail_score.h"
+#include "ui/base/page_transition_types.h"
#include "ui/gfx/size.h"
#include "url/gurl.h"
class PageUsageData;
+// TODO(sdefresne): remove, http://crbug.com/371816
+namespace content {
+class WebContents;
+}
+
namespace history {
// Forward declaration for friend statements.
@@ -38,6 +44,12 @@ typedef int64 FaviconBitmapID; // Identifier for a bitmap in a favicon.
typedef int64 SegmentID; // URL segments for the most visited view.
typedef int64 IconMappingID; // For page url and icon mapping.
+// Identifier for a context to scope page ids. (ContextIDs are used in
+// comparisons only and are never dereferenced.)
+// NB: The use of WebContents here is temporary; when the dependency on content
+// is broken, some other type will take its place.
+typedef content::WebContents* ContextID;
+
// The enumeration of all possible sources of visits is listed below.
// The source will be propagated along with a URL or a visit item
// and eventually be stored in the history database,
@@ -58,6 +70,60 @@ typedef int64 VisitID;
// Structure to hold the mapping between each visit's id and its source.
typedef std::map<VisitID, VisitSource> VisitSourceMap;
+// VisitRow -------------------------------------------------------------------
+
+// Holds all information associated with a specific visit. A visit holds time
+// and referrer information for one time a URL is visited.
+class VisitRow {
+ public:
+ VisitRow();
+ VisitRow(URLID arg_url_id,
+ base::Time arg_visit_time,
+ VisitID arg_referring_visit,
+ ui::PageTransition arg_transition,
+ SegmentID arg_segment_id);
+ ~VisitRow();
+
+ // ID of this row (visit ID, used a a referrer for other visits).
+ VisitID visit_id;
+
+ // Row ID into the URL table of the URL that this page is.
+ URLID url_id;
+
+ base::Time visit_time;
+
+ // Indicates another visit that was the referring page for this one.
+ // 0 indicates no referrer.
+ VisitID referring_visit;
+
+ // A combination of bits from PageTransition.
+ ui::PageTransition transition;
+
+ // The segment id (see visitsegment_database.*).
+ // If 0, the segment id is null in the table.
+ SegmentID segment_id;
+
+ // Record how much time a user has this visit starting from the user
+ // opened this visit to the user closed or ended this visit.
+ // This includes both active and inactive time as long as
+ // the visit was present.
+ base::TimeDelta visit_duration;
+
+ // Compares two visits based on dates, for sorting.
+ bool operator<(const VisitRow& other) {
+ return visit_time < other.visit_time;
+ }
+
+ // We allow the implicit copy constuctor and operator=.
+};
+
+// We pass around vectors of visits a lot
+typedef std::vector<VisitRow> VisitVector;
+
+// The basic information associated with a visit (timestamp, type of visit),
+// used by HistoryBackend::AddVisits() to create new visits for a URL.
+typedef std::pair<base::Time, ui::PageTransition> VisitInfo;
+
// PageVisit ------------------------------------------------------------------
// Represents a simplified version of a visit for external users. Normally,
@@ -220,6 +286,20 @@ struct QueryOptions {
int64 EffectiveEndTime() const;
};
+// QueryURLResult -------------------------------------------------------------
+
+// QueryURLResult encapsulates the result of a call to HistoryBackend::QueryURL.
+struct QueryURLResult {
+ QueryURLResult();
+ ~QueryURLResult();
+
+ // Indicates whether the call to HistoryBackend::QueryURL was successfull
+ // or not. If false, then both |row| and |visits| fields are undefined.
+ bool success;
+ URLRow row;
+ VisitVector visits;
+};
+
// VisibleVisitCountToHostResult ----------------------------------------------
// VisibleVisitCountToHostResult encapsulates the result of a call to
@@ -285,6 +365,41 @@ struct FilteredURL {
ExtendedInfo extended_info;
};
+// Navigation -----------------------------------------------------------------
+
+// Marshalling structure for AddPage.
+struct HistoryAddPageArgs {
+ // The default constructor is equivalent to:
+ //
+ // HistoryAddPageArgs(
+ // GURL(), base::Time(), NULL, 0, GURL(),
+ // history::RedirectList(), ui::PAGE_TRANSITION_LINK,
+ // SOURCE_BROWSED, false)
+ HistoryAddPageArgs();
+ HistoryAddPageArgs(const GURL& url,
+ base::Time time,
+ ContextID context_id,
+ int32 page_id,
+ const GURL& referrer,
+ const history::RedirectList& redirects,
+ ui::PageTransition transition,
+ VisitSource source,
+ bool did_replace_entry);
+ ~HistoryAddPageArgs();
+
+ GURL url;
+ base::Time time;
+
+ ContextID context_id;
+ int32 page_id;
+
+ GURL referrer;
+ history::RedirectList redirects;
+ ui::PageTransition transition;
+ VisitSource visit_source;
+ bool did_replace_entry;
+};
+
// TopSites -------------------------------------------------------------------
typedef std::vector<MostVisitedURL> MostVisitedURLList;
@@ -402,6 +517,20 @@ struct FaviconBitmap {
gfx::Size pixel_size;
};
+// Abbreviated information about a visit.
+struct BriefVisitInfo {
+ URLID url_id;
+ base::Time time;
+ ui::PageTransition transition;
+};
+
+// An observer of VisitDatabase.
+class VisitDatabaseObserver {
+ public:
+ virtual ~VisitDatabaseObserver();
+ virtual void OnAddVisit(const BriefVisitInfo& info) = 0;
+};
+
struct ExpireHistoryArgs {
ExpireHistoryArgs();
~ExpireHistoryArgs();
diff --git a/chrome/browser/history/history_types_unittest.cc b/components/history/core/browser/history_types_unittest.cc
index 80c84e0..92c2f90 100644
--- a/chrome/browser/history/history_types_unittest.cc
+++ b/components/history/core/browser/history_types_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/history/history_types.h"
+#include "components/history/core/browser/history_types.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace history {