summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsdefresne <sdefresne@chromium.org>2014-12-30 11:23:49 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-30 19:25:07 +0000
commiteb278881097c0365c0e265392ff50f03c6292862 (patch)
tree80af2b03f42385a846fbe92787461b2c94b4d8c3
parentd8de1100ecce0dbf8e0e52a7bf72f0e5517b5ff8 (diff)
downloadchromium_src-eb278881097c0365c0e265392ff50f03c6292862.zip
chromium_src-eb278881097c0365c0e265392ff50f03c6292862.tar.gz
chromium_src-eb278881097c0365c0e265392ff50f03c6292862.tar.bz2
Partial componentization of //chrome/browser/history
Move thumbnail_database.{cc,h} to //components/history/core/browser as they don't have dependency on //chrome or //content and add a new depenency on //third_party/sqlite from the history component. Move url_utils.{cc,h}, visit_filter.{cc,h}, visit_tracker.{cc,h}, visitsegment_database.{cc,h}, in_memory_url_index_types.{cc,h} and top_sites_cache.{cc,h} to //components/history/core/browser as they are leaf files that don't have dependency on //chrome or //content. Move visit_database.{cc,h} to //components/history/core/browser after fixing the #include to use "url/url_constants.h" to get the constants defined in the url namespace. Move in_memory_url_index_cache.proto since it has no dependencies and add the gyp target history_core_browser_proto and gn target //components/history/core/browser:proto. All files were moved using tools/git/move_source_files.py and then the build system files (gyp and gn) were manually editted. Remove obsolete #includes and fix missing #includes. BUG=390953, 370850 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/831643003 Cr-Commit-Position: refs/heads/master@{#309765}
-rw-r--r--chrome/browser/BUILD.gn2
-rw-r--r--chrome/browser/android/provider/chrome_browser_provider.cc1
-rw-r--r--chrome/browser/autocomplete/history_provider.cc2
-rw-r--r--chrome/browser/autocomplete/history_provider.h2
-rw-r--r--chrome/browser/autocomplete/history_quick_provider.cc2
-rw-r--r--chrome/browser/autocomplete/history_url_provider.cc2
-rw-r--r--chrome/browser/chromeos/BUILD.gn2
-rw-r--r--chrome/browser/extensions/BUILD.gn2
-rw-r--r--chrome/browser/history/BUILD.gn12
-rw-r--r--chrome/browser/history/android/android_provider_backend.cc2
-rw-r--r--chrome/browser/history/android/favicon_sql_handler.cc2
-rw-r--r--chrome/browser/history/expire_history_backend.cc2
-rw-r--r--chrome/browser/history/expire_history_backend_unittest.cc3
-rw-r--r--chrome/browser/history/history_backend.cc2
-rw-r--r--chrome/browser/history/history_backend.h4
-rw-r--r--chrome/browser/history/history_backend_unittest.cc2
-rw-r--r--chrome/browser/history/history_database.h4
-rw-r--r--chrome/browser/history/history_service.cc4
-rw-r--r--chrome/browser/history/in_memory_url_index.cc2
-rw-r--r--chrome/browser/history/in_memory_url_index.h2
-rw-r--r--chrome/browser/history/in_memory_url_index_unittest.cc2
-rw-r--r--chrome/browser/history/scored_history_match.h2
-rw-r--r--chrome/browser/history/thumbnail_database_unittest.cc2
-rw-r--r--chrome/browser/history/top_sites.h4
-rw-r--r--chrome/browser/history/top_sites_impl.cc4
-rw-r--r--chrome/browser/history/top_sites_impl_unittest.cc2
-rw-r--r--chrome/browser/history/url_index_private_data.h4
-rw-r--r--chrome/browser/prerender/prerender_local_predictor.h2
-rw-r--r--chrome/browser/ui/BUILD.gn2
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc3
-rw-r--r--chrome/browser/ui/webui/ntp/suggestions_source_top_sites.h2
-rw-r--r--chrome/chrome_browser.gypi30
-rw-r--r--chrome/chrome_browser_chromeos.gypi2
-rw-r--r--chrome/chrome_browser_extensions.gypi2
-rw-r--r--chrome/chrome_browser_ui.gypi2
-rw-r--r--chrome/chrome_tests_unit.gypi6
-rw-r--r--components/components_tests.gyp6
-rw-r--r--components/history.gypi33
-rw-r--r--components/history/DEPS1
-rw-r--r--components/history/core/browser/BUILD.gn26
-rw-r--r--components/history/core/browser/in_memory_url_index_cache.proto (renamed from chrome/browser/history/in_memory_url_index_cache.proto)0
-rw-r--r--components/history/core/browser/in_memory_url_index_types.cc (renamed from chrome/browser/history/in_memory_url_index_types.cc)2
-rw-r--r--components/history/core/browser/in_memory_url_index_types.h (renamed from chrome/browser/history/in_memory_url_index_types.h)6
-rw-r--r--components/history/core/browser/in_memory_url_index_types_unittest.cc (renamed from chrome/browser/history/in_memory_url_index_types_unittest.cc)3
-rw-r--r--components/history/core/browser/thumbnail_database.cc (renamed from chrome/browser/history/thumbnail_database.cc)6
-rw-r--r--components/history/core/browser/thumbnail_database.h (renamed from chrome/browser/history/thumbnail_database.h)6
-rw-r--r--components/history/core/browser/top_sites_cache.cc (renamed from chrome/browser/history/top_sites_cache.cc)2
-rw-r--r--components/history/core/browser/top_sites_cache.h (renamed from chrome/browser/history/top_sites_cache.h)8
-rw-r--r--components/history/core/browser/top_sites_cache_unittest.cc (renamed from chrome/browser/history/top_sites_cache_unittest.cc)2
-rw-r--r--components/history/core/browser/url_utils.cc (renamed from chrome/browser/history/url_utils.cc)4
-rw-r--r--components/history/core/browser/url_utils.h (renamed from chrome/browser/history/url_utils.h)6
-rw-r--r--components/history/core/browser/url_utils_unittest.cc (renamed from chrome/browser/history/url_utils_unittest.cc)2
-rw-r--r--components/history/core/browser/visit_database.cc (renamed from chrome/browser/history/visit_database.cc)6
-rw-r--r--components/history/core/browser/visit_database.h (renamed from chrome/browser/history/visit_database.h)6
-rw-r--r--components/history/core/browser/visit_database_unittest.cc (renamed from chrome/browser/history/visit_database_unittest.cc)2
-rw-r--r--components/history/core/browser/visit_filter.cc (renamed from chrome/browser/history/visit_filter.cc)2
-rw-r--r--components/history/core/browser/visit_filter.h (renamed from chrome/browser/history/visit_filter.h)6
-rw-r--r--components/history/core/browser/visit_filter_unittest.cc (renamed from chrome/browser/history/visit_filter_unittest.cc)2
-rw-r--r--components/history/core/browser/visit_tracker.cc (renamed from chrome/browser/history/visit_tracker.cc)2
-rw-r--r--components/history/core/browser/visit_tracker.h (renamed from chrome/browser/history/visit_tracker.h)6
-rw-r--r--components/history/core/browser/visit_tracker_unittest.cc (renamed from chrome/browser/history/visit_tracker_unittest.cc)3
-rw-r--r--components/history/core/browser/visitsegment_database.cc (renamed from chrome/browser/history/visitsegment_database.cc)2
-rw-r--r--components/history/core/browser/visitsegment_database.h (renamed from chrome/browser/history/visitsegment_database.h)6
63 files changed, 153 insertions, 130 deletions
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 7ec6ebe..240f3cd 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -59,7 +59,6 @@ static_library("browser") {
"//chrome/app:generated_resources_map",
"//chrome/app/resources:platform_locale_settings",
"//chrome/app/theme:theme_resources",
- "//chrome/browser/history:in_memory_url_index_cache_proto",
"//chrome/browser/net:cert_logger_proto",
"//chrome/browser/net:probe_message_proto",
"//chrome/browser/ui",
@@ -83,6 +82,7 @@ static_library("browser") {
"//components/google/core/browser",
"//components/handoff",
"//components/history/core/browser",
+ "//components/history/core/browser:proto",
"//components/history/core/common",
"//components/infobars/core",
"//components/invalidation",
diff --git a/chrome/browser/android/provider/chrome_browser_provider.cc b/chrome/browser/android/provider/chrome_browser_provider.cc
index 681aa8b..f8c2147 100644
--- a/chrome/browser/android/provider/chrome_browser_provider.cc
+++ b/chrome/browser/android/provider/chrome_browser_provider.cc
@@ -27,6 +27,7 @@
#include "chrome/browser/favicon/favicon_service.h"
#include "chrome/browser/favicon/favicon_service_factory.h"
#include "chrome/browser/history/android/sqlite_cursor.h"
+#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/autocomplete/history_provider.cc b/chrome/browser/autocomplete/history_provider.cc
index a23adad..6f9dc2e 100644
--- a/chrome/browser/autocomplete/history_provider.cc
+++ b/chrome/browser/autocomplete/history_provider.cc
@@ -11,10 +11,10 @@
#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/in_memory_url_index_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
#include "components/bookmarks/browser/bookmark_model.h"
+#include "components/history/core/browser/in_memory_url_index_types.h"
#include "components/omnibox/autocomplete_input.h"
#include "components/omnibox/autocomplete_match.h"
#include "url/url_util.h"
diff --git a/chrome/browser/autocomplete/history_provider.h b/chrome/browser/autocomplete/history_provider.h
index 935dc5a..ed957ad 100644
--- a/chrome/browser/autocomplete/history_provider.h
+++ b/chrome/browser/autocomplete/history_provider.h
@@ -6,7 +6,7 @@
#define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_
#include "base/compiler_specific.h"
-#include "chrome/browser/history/in_memory_url_index_types.h"
+#include "components/history/core/browser/in_memory_url_index_types.h"
#include "components/omnibox/autocomplete_provider.h"
class AutocompleteInput;
diff --git a/chrome/browser/autocomplete/history_quick_provider.cc b/chrome/browser/autocomplete/history_quick_provider.cc
index 5cff89c..de1c711 100644
--- a/chrome/browser/autocomplete/history_quick_provider.cc
+++ b/chrome/browser/autocomplete/history_quick_provider.cc
@@ -23,13 +23,13 @@
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/in_memory_url_index.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"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "components/history/core/browser/in_memory_url_index_types.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
#include "components/omnibox/autocomplete_match_type.h"
#include "components/omnibox/autocomplete_result.h"
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 14f60a8..c87a71b 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/in_memory_url_index_types.h"
#include "chrome/browser/history/scored_history_match.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
@@ -30,6 +29,7 @@
#include "chrome/common/url_constants.h"
#include "components/bookmarks/browser/bookmark_utils.h"
#include "components/history/core/browser/history_types.h"
+#include "components/history/core/browser/in_memory_url_index_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/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn
index a81bf54..4c5112e 100644
--- a/chrome/browser/chromeos/BUILD.gn
+++ b/chrome/browser/chromeos/BUILD.gn
@@ -48,7 +48,6 @@ source_set("chromeos") {
"//components/wifi_sync",
"//chrome/browser/devtools",
"//chrome/browser/extensions",
- "//chrome/browser/history:in_memory_url_index_cache_proto",
"//chrome/browser/net:cert_logger_proto",
"//chrome/browser/safe_browsing:chunk_proto",
"//chrome/browser/safe_browsing:metadata_proto",
@@ -63,6 +62,7 @@ source_set("chromeos") {
"//chromeos:cryptohome_proto",
"//chromeos:cryptohome_signkey_proto",
"//chromeos:power_manager_proto",
+ "//components/history/core/browser:proto",
"//components/onc",
"//components/ownership",
"//components/pairing",
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn
index 790c323..0a4584a 100644
--- a/chrome/browser/extensions/BUILD.gn
+++ b/chrome/browser/extensions/BUILD.gn
@@ -39,13 +39,13 @@ static_library("extensions") {
"//chrome/app/resources:platform_locale_settings",
"//chrome/app/theme:theme_resources",
"//chrome/browser/devtools",
- "//chrome/browser/history:in_memory_url_index_cache_proto",
"//chrome/common",
"//chrome/common/extensions/api:api_registration",
"//chrome/common/net",
"//chrome/common/safe_browsing:proto",
"//chrome/installer/util",
"//components/copresence",
+ "//components/history/core/browser:proto",
"//components/omaha_client",
"//components/onc",
"//components/proximity_auth",
diff --git a/chrome/browser/history/BUILD.gn b/chrome/browser/history/BUILD.gn
deleted file mode 100644
index 6cb65f4..0000000
--- a/chrome/browser/history/BUILD.gn
+++ /dev/null
@@ -1,12 +0,0 @@
-# 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.
-
-import("//third_party/protobuf/proto_library.gni")
-
-# GYP version: chrome/chrome_browser.gypi:in_memory_url_index_cache_proto
-proto_library("in_memory_url_index_cache_proto") {
- sources = [
- "in_memory_url_index_cache.proto",
- ]
-}
diff --git a/chrome/browser/history/android/android_provider_backend.cc b/chrome/browser/history/android/android_provider_backend.cc
index dddf6ce..536754e 100644
--- a/chrome/browser/history/android/android_provider_backend.cc
+++ b/chrome/browser/history/android/android_provider_backend.cc
@@ -14,10 +14,10 @@
#include "chrome/browser/history/android/visit_sql_handler.h"
#include "chrome/browser/history/history_backend.h"
#include "chrome/browser/history/history_database.h"
-#include "chrome/browser/history/thumbnail_database.h"
#include "components/history/core/browser/history_backend_notifier.h"
#include "components/history/core/browser/history_client.h"
#include "components/history/core/browser/keyword_search_term.h"
+#include "components/history/core/browser/thumbnail_database.h"
#include "sql/connection.h"
diff --git a/chrome/browser/history/android/favicon_sql_handler.cc b/chrome/browser/history/android/favicon_sql_handler.cc
index e56d71c..d40efe9 100644
--- a/chrome/browser/history/android/favicon_sql_handler.cc
+++ b/chrome/browser/history/android/favicon_sql_handler.cc
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_memory.h"
-#include "chrome/browser/history/thumbnail_database.h"
+#include "components/history/core/browser/thumbnail_database.h"
using base::Time;
diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc
index f4d1094..81990f12 100644
--- a/chrome/browser/history/expire_history_backend.cc
+++ b/chrome/browser/history/expire_history_backend.cc
@@ -15,9 +15,9 @@
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "chrome/browser/history/history_database.h"
-#include "chrome/browser/history/thumbnail_database.h"
#include "components/history/core/browser/history_backend_notifier.h"
#include "components/history/core/browser/history_client.h"
+#include "components/history/core/browser/thumbnail_database.h"
namespace history {
diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc
index 29b9d43..2a3c8e0 100644
--- a/chrome/browser/history/expire_history_backend_unittest.cc
+++ b/chrome/browser/history/expire_history_backend_unittest.cc
@@ -17,11 +17,12 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/history/expire_history_backend.h"
#include "chrome/browser/history/history_database.h"
-#include "chrome/browser/history/thumbnail_database.h"
+#include "chrome/browser/history/history_details.h"
#include "chrome/browser/history/top_sites.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/tools/profiles/thumbnail-inl.h"
#include "components/history/core/browser/history_backend_notifier.h"
+#include "components/history/core/browser/thumbnail_database.h"
#include "components/history/core/common/thumbnail_score.h"
#include "components/history/core/test/history_client_fake_bookmarks.h"
#include "content/public/test/test_browser_thread.h"
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc
index 88024c3..5e39178 100644
--- a/chrome/browser/history/history_backend.cc
+++ b/chrome/browser/history/history_backend.cc
@@ -31,7 +31,6 @@
#include "chrome/browser/history/top_sites.h"
#include "chrome/browser/history/typed_url_syncable_service.h"
#include "chrome/browser/history/typed_url_syncable_service.h"
-#include "chrome/browser/history/visit_filter.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/importer/imported_favicon_usage.h"
#include "chrome/common/url_constants.h"
@@ -42,6 +41,7 @@
#include "components/history/core/browser/history_db_task.h"
#include "components/history/core/browser/keyword_search_term.h"
#include "components/history/core/browser/page_usage_data.h"
+#include "components/history/core/browser/visit_filter.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "sql/error_delegate_util.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/history/history_backend.h b/chrome/browser/history/history_backend.h
index d0987e5..61002a1 100644
--- a/chrome/browser/history/history_backend.h
+++ b/chrome/browser/history/history_backend.h
@@ -20,11 +20,11 @@
#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/thumbnail_database.h"
-#include "chrome/browser/history/visit_tracker.h"
#include "components/history/core/browser/history_backend_notifier.h"
#include "components/history/core/browser/history_types.h"
#include "components/history/core/browser/keyword_id.h"
+#include "components/history/core/browser/thumbnail_database.h"
+#include "components/history/core/browser/visit_tracker.h"
#include "components/visitedlink/browser/visitedlink_delegate.h"
#include "sql/init_status.h"
diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc
index cbbcac4..5825415 100644
--- a/chrome/browser/history/history_backend_unittest.cc
+++ b/chrome/browser/history/history_backend_unittest.cc
@@ -26,7 +26,6 @@
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/in_memory_history_backend.h"
-#include "chrome/browser/history/visit_filter.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/importer/imported_favicon_usage.h"
@@ -34,6 +33,7 @@
#include "components/history/core/browser/history_constants.h"
#include "components/history/core/browser/in_memory_database.h"
#include "components/history/core/browser/keyword_search_term.h"
+#include "components/history/core/browser/visit_filter.h"
#include "components/history/core/test/history_client_fake_bookmarks.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/history/history_database.h b/chrome/browser/history/history_database.h
index d0d79a9..deb26e2 100644
--- a/chrome/browser/history/history_database.h
+++ b/chrome/browser/history/history_database.h
@@ -10,9 +10,9 @@
#include "base/gtest_prod_util.h"
#include "build/build_config.h"
#include "chrome/browser/history/download_database.h"
-#include "chrome/browser/history/visit_database.h"
-#include "chrome/browser/history/visitsegment_database.h"
#include "components/history/core/browser/url_database.h"
+#include "components/history/core/browser/visit_database.h"
+#include "components/history/core/browser/visitsegment_database.h"
#include "sql/connection.h"
#include "sql/init_status.h"
#include "sql/meta_table.h"
diff --git a/chrome/browser/history/history_service.cc b/chrome/browser/history/history_service.cc
index ea86061..a22ac4b 100644
--- a/chrome/browser/history/history_service.cc
+++ b/chrome/browser/history/history_service.cc
@@ -37,8 +37,6 @@
#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"
-#include "chrome/browser/history/visit_database.h"
-#include "chrome/browser/history/visit_filter.h"
#include "chrome/browser/history/web_history_service.h"
#include "chrome/browser/history/web_history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -53,6 +51,8 @@
#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/browser/visit_database.h"
+#include "components/history/core/browser/visit_filter.h"
#include "components/history/core/common/thumbnail_score.h"
#include "components/visitedlink/browser/visitedlink_master.h"
#include "content/public/browser/browser_thread.h"
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
index 74ad2a0..b14a19e 100644
--- a/chrome/browser/history/in_memory_url_index.cc
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -7,7 +7,6 @@
#include "base/debug/trace_event.h"
#include "base/files/file_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service.h"
@@ -15,7 +14,6 @@
#include "chrome/browser/history/url_index_private_data.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/url_constants.h"
-#include "components/bookmarks/browser/bookmark_model.h"
#include "components/history/core/browser/url_database.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
diff --git a/chrome/browser/history/in_memory_url_index.h b/chrome/browser/history/in_memory_url_index.h
index 59dbd20..69b5b90 100644
--- a/chrome/browser/history/in_memory_url_index.h
+++ b/chrome/browser/history/in_memory_url_index.h
@@ -19,11 +19,11 @@
#include "base/scoped_observer.h"
#include "base/strings/string16.h"
#include "base/task/cancelable_task_tracker.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_db_task.h"
#include "components/history/core/browser/history_service_observer.h"
#include "components/history/core/browser/history_types.h"
+#include "components/history/core/browser/in_memory_url_index_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_unittest.cc b/chrome/browser/history/in_memory_url_index_unittest.cc
index 59f8a80..318e8c9 100644
--- a/chrome/browser/history/in_memory_url_index_unittest.cc
+++ b/chrome/browser/history/in_memory_url_index_unittest.cc
@@ -22,13 +22,13 @@
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/in_memory_url_index.h"
-#include "chrome/browser/history/in_memory_url_index_types.h"
#include "chrome/browser/history/url_index_private_data.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/test/base/history_index_restore_observer.h"
#include "chrome/test/base/testing_profile.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
#include "components/history/core/browser/history_client.h"
+#include "components/history/core/browser/in_memory_url_index_types.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "content/public/test/test_browser_thread_bundle.h"
diff --git a/chrome/browser/history/scored_history_match.h b/chrome/browser/history/scored_history_match.h
index eb8f4cb..15a37e7 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/in_memory_url_index_types.h"
#include "components/history/core/browser/history_match.h"
#include "components/history/core/browser/history_types.h"
+#include "components/history/core/browser/in_memory_url_index_types.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
namespace history {
diff --git a/chrome/browser/history/thumbnail_database_unittest.cc b/chrome/browser/history/thumbnail_database_unittest.cc
index f5ec54d..0b2c6ab 100644
--- a/chrome/browser/history/thumbnail_database_unittest.cc
+++ b/chrome/browser/history/thumbnail_database_unittest.cc
@@ -11,8 +11,8 @@
#include "base/files/scoped_temp_dir.h"
#include "base/memory/ref_counted_memory.h"
#include "base/path_service.h"
-#include "chrome/browser/history/thumbnail_database.h"
#include "chrome/common/chrome_paths.h"
+#include "components/history/core/browser/thumbnail_database.h"
#include "sql/connection.h"
#include "sql/recovery.h"
#include "sql/test/scoped_error_ignorer.h"
diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h
index 3f5260f..96a82b0 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -9,10 +9,12 @@
#include "base/callback.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
-#include "chrome/browser/history/history_service.h"
+#include "base/observer_list.h"
+#include "base/task/cancelable_task_tracker.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 "content/public/browser/notification_observer.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/image/image.h"
diff --git a/chrome/browser/history/top_sites_impl.cc b/chrome/browser/history/top_sites_impl.cc
index d6d2f16..853e8dac 100644
--- a/chrome/browser/history/top_sites_impl.cc
+++ b/chrome/browser/history/top_sites_impl.cc
@@ -24,12 +24,12 @@
#include "chrome/browser/history/history_backend.h"
#include "chrome/browser/history/history_notifications.h"
#include "chrome/browser/history/history_service_factory.h"
-#include "chrome/browser/history/top_sites_cache.h"
-#include "chrome/browser/history/url_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
#include "components/history/core/browser/history_db_task.h"
#include "components/history/core/browser/page_usage_data.h"
+#include "components/history/core/browser/top_sites_cache.h"
+#include "components/history/core/browser/url_utils.h"
#include "components/history/core/common/thumbnail_score.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_controller.h"
diff --git a/chrome/browser/history/top_sites_impl_unittest.cc b/chrome/browser/history/top_sites_impl_unittest.cc
index de3b63b..381c8fb 100644
--- a/chrome/browser/history/top_sites_impl_unittest.cc
+++ b/chrome/browser/history/top_sites_impl_unittest.cc
@@ -12,13 +12,13 @@
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/history_unittest_base.h"
#include "chrome/browser/history/top_sites.h"
-#include "chrome/browser/history/top_sites_cache.h"
#include "chrome/browser/history/top_sites_impl.h"
#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_db_task.h"
#include "components/history/core/browser/history_types.h"
+#include "components/history/core/browser/top_sites_cache.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/url_index_private_data.h b/chrome/browser/history/url_index_private_data.h
index 6fe6f18..a2b4a6b 100644
--- a/chrome/browser/history/url_index_private_data.h
+++ b/chrome/browser/history/url_index_private_data.h
@@ -12,9 +12,9 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/history/history_service.h"
-#include "chrome/browser/history/in_memory_url_index_cache.pb.h"
-#include "chrome/browser/history/in_memory_url_index_types.h"
#include "chrome/browser/history/scored_history_match.h"
+#include "components/history/core/browser/in_memory_url_index_cache.pb.h"
+#include "components/history/core/browser/in_memory_url_index_types.h"
class HistoryQuickProviderTest;
diff --git a/chrome/browser/prerender/prerender_local_predictor.h b/chrome/browser/prerender/prerender_local_predictor.h
index e91ba31..8734d69 100644
--- a/chrome/browser/prerender/prerender_local_predictor.h
+++ b/chrome/browser/prerender/prerender_local_predictor.h
@@ -14,8 +14,8 @@
#include "base/scoped_observer.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/timer/timer.h"
-#include "chrome/browser/history/visit_database.h"
#include "components/history/core/browser/history_service_observer.h"
+#include "components/history/core/browser/visit_database.h"
#include "content/public/browser/session_storage_namespace.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 41e2328..6ca4613 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -41,7 +41,6 @@ static_library("ui") {
"//chrome:strings",
"//chrome/app/resources:platform_locale_settings",
"//chrome/app/theme:theme_resources",
- "//chrome/browser/history:in_memory_url_index_cache_proto",
"//chrome/browser/net:cert_logger_proto",
"//chrome/common",
"//chrome/common/net",
@@ -49,6 +48,7 @@ static_library("ui") {
"//components/auto_login_parser",
"//components/dom_distiller/webui",
"//components/feedback/proto",
+ "//components/history/core/browser:proto",
"//components/invalidation",
"//components/omaha_client",
"//components/onc",
diff --git a/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc b/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc
index 93b5204..49fb628 100644
--- a/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc
+++ b/chrome/browser/ui/webui/ntp/suggestions_source_top_sites.cc
@@ -10,13 +10,14 @@
#include "base/stl_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/values.h"
+#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/history/top_sites.h"
-#include "chrome/browser/history/visit_filter.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/browser/ui/webui/ntp/suggestions_combiner.h"
#include "chrome/common/chrome_switches.h"
+#include "components/history/core/browser/visit_filter.h"
namespace {
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 818397c..3d22043 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/visit_filter.h"
#include "chrome/browser/ui/webui/ntp/suggestions_source.h"
#include "components/history/core/browser/history_types.h"
+#include "components/history/core/browser/visit_filter.h"
class SuggestionsCombiner;
class Profile;
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 2d04f84..77978be 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -1530,20 +1530,14 @@
'browser/history/in_memory_history_backend.h',
'browser/history/in_memory_url_index.cc',
'browser/history/in_memory_url_index.h',
- 'browser/history/in_memory_url_index_types.cc',
- 'browser/history/in_memory_url_index_types.h',
'browser/history/scored_history_match.cc',
'browser/history/scored_history_match.h',
'browser/history/shortcuts_database.cc',
'browser/history/shortcuts_database.h',
- 'browser/history/thumbnail_database.cc',
- 'browser/history/thumbnail_database.h',
'browser/history/top_sites.cc',
'browser/history/top_sites.h',
'browser/history/top_sites_backend.cc',
'browser/history/top_sites_backend.h',
- 'browser/history/top_sites_cache.cc',
- 'browser/history/top_sites_cache.h',
'browser/history/top_sites_database.cc',
'browser/history/top_sites_database.h',
'browser/history/top_sites_impl.cc',
@@ -1552,16 +1546,6 @@
'browser/history/typed_url_syncable_service.h',
'browser/history/url_index_private_data.cc',
'browser/history/url_index_private_data.h',
- 'browser/history/url_utils.cc',
- 'browser/history/url_utils.h',
- 'browser/history/visit_database.cc',
- 'browser/history/visit_database.h',
- 'browser/history/visit_filter.cc',
- 'browser/history/visit_filter.h',
- 'browser/history/visit_tracker.cc',
- 'browser/history/visit_tracker.h',
- 'browser/history/visitsegment_database.cc',
- 'browser/history/visitsegment_database.h',
'browser/history/web_history_service.cc',
'browser/history/web_history_service.h',
'browser/history/web_history_service_factory.cc',
@@ -2895,7 +2879,6 @@
'chrome_resources.gyp:theme_resources',
'common',
'common_net',
- 'in_memory_url_index_cache_proto',
'probe_message_proto',
'../components/components.gyp:autofill_core_browser',
'../components/components.gyp:bookmarks_browser',
@@ -3628,19 +3611,6 @@
},
'includes': [ '../build/protoc.gypi' ]
},
- {
- # Protobuf compiler / generator for the InMemoryURLIndex caching
- # protocol buffer.
- # GN version: //chrome/browser/history:in_memory_url_index_cache_proto
- 'target_name': 'in_memory_url_index_cache_proto',
- 'type': 'static_library',
- 'sources': [ 'browser/history/in_memory_url_index_cache.proto' ],
- 'variables': {
- 'proto_in_dir': 'browser/history',
- 'proto_out_dir': 'chrome/browser/history',
- },
- 'includes': [ '../build/protoc.gypi' ]
- },
],
'conditions': [
['OS=="android"', {
diff --git a/chrome/chrome_browser_chromeos.gypi b/chrome/chrome_browser_chromeos.gypi
index b187589..163695a 100644
--- a/chrome/chrome_browser_chromeos.gypi
+++ b/chrome/chrome_browser_chromeos.gypi
@@ -1065,7 +1065,6 @@
'debugger',
'device_policy_proto',
'drive_proto',
- 'in_memory_url_index_cache_proto',
'installer_util',
'safe_browsing_chunk_proto',
'safe_browsing_proto',
@@ -1080,6 +1079,7 @@
'../chromeos/chromeos.gyp:power_manager_proto',
'../chromeos/ime/input_method.gyp:gencode',
'../components/components.gyp:cloud_policy_proto',
+ '../components/components.gyp:history_core_browser_proto',
'../components/components.gyp:login',
'../components/components.gyp:onc_component',
'../components/components.gyp:ownership',
diff --git a/chrome/chrome_browser_extensions.gypi b/chrome/chrome_browser_extensions.gypi
index 0140298..4cb3be8 100644
--- a/chrome/chrome_browser_extensions.gypi
+++ b/chrome/chrome_browser_extensions.gypi
@@ -920,10 +920,10 @@
'common/extensions/api/api.gyp:chrome_api',
'common_net',
'debugger',
- 'in_memory_url_index_cache_proto',
'installer_util',
'safe_browsing_proto',
'../components/components.gyp:copresence',
+ '../components/components.gyp:history_core_browser_proto',
'../components/components.gyp:omaha_client',
'../components/components.gyp:onc_component',
'../components/components.gyp:proximity_auth',
diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi
index 3db256d8..918eccf 100644
--- a/chrome/chrome_browser_ui.gypi
+++ b/chrome/chrome_browser_ui.gypi
@@ -2664,11 +2664,11 @@
'chrome_resources.gyp:theme_resources',
'common',
'common_net',
- 'in_memory_url_index_cache_proto',
'../components/components.gyp:auto_login_parser',
'../components/components.gyp:dom_distiller_core',
'../components/components.gyp:dom_distiller_webui',
'../components/components.gyp:feedback_proto',
+ '../components/components.gyp:history_core_browser_proto',
'../components/components.gyp:invalidation',
'../components/components.gyp:omaha_client',
'../components/components.gyp:onc_component',
diff --git a/chrome/chrome_tests_unit.gypi b/chrome/chrome_tests_unit.gypi
index 33108f6..0df0d0b 100644
--- a/chrome/chrome_tests_unit.gypi
+++ b/chrome/chrome_tests_unit.gypi
@@ -465,20 +465,14 @@
'browser/history/history_unittest.cc',
'browser/history/history_unittest_base.cc',
'browser/history/history_unittest_base.h',
- 'browser/history/in_memory_url_index_types_unittest.cc',
'browser/history/in_memory_url_index_unittest.cc',
'browser/history/scored_history_match_unittest.cc',
'browser/history/select_favicon_frames_unittest.cc',
'browser/history/shortcuts_database_unittest.cc',
'browser/history/thumbnail_database_unittest.cc',
- 'browser/history/top_sites_cache_unittest.cc',
'browser/history/top_sites_database_unittest.cc',
'browser/history/top_sites_impl_unittest.cc',
'browser/history/typed_url_syncable_service_unittest.cc',
- 'browser/history/url_utils_unittest.cc',
- 'browser/history/visit_database_unittest.cc',
- 'browser/history/visit_filter_unittest.cc',
- 'browser/history/visit_tracker_unittest.cc',
'browser/history/web_history_service_unittest.cc',
'browser/image_holder_unittest.cc',
'browser/importer/firefox_profile_lock_unittest.cc',
diff --git a/components/components_tests.gyp b/components/components_tests.gyp
index 9392238..fba5778 100644
--- a/components/components_tests.gyp
+++ b/components/components_tests.gyp
@@ -146,7 +146,13 @@
'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/in_memory_url_index_types_unittest.cc',
+ 'history/core/browser/top_sites_cache_unittest.cc',
'history/core/browser/url_database_unittest.cc',
+ 'history/core/browser/url_utils_unittest.cc',
+ 'history/core/browser/visit_database_unittest.cc',
+ 'history/core/browser/visit_filter_unittest.cc',
+ 'history/core/browser/visit_tracker_unittest.cc',
'history/core/common/thumbnail_score_unittest.cc',
'invalidation/invalidation_logger_unittest.cc',
'json_schema/json_schema_validator_unittest.cc',
diff --git a/components/history.gypi b/components/history.gypi
index 622a540..f91843d 100644
--- a/components/history.gypi
+++ b/components/history.gypi
@@ -15,10 +15,12 @@
'../base/base.gyp:base',
'../net/net.gyp:net',
'../sql/sql.gyp:sql',
+ '../third_party/sqlite/sqlite.gyp:sqlite',
'../ui/base/ui_base.gyp:ui_base',
'../ui/gfx/gfx.gyp:gfx',
'../url/url.gyp:url_lib',
'favicon_base',
+ 'history_core_browser_proto',
'keyed_service_core',
'query_parser',
],
@@ -38,19 +40,50 @@
'history/core/browser/history_types.h',
'history/core/browser/in_memory_database.cc',
'history/core/browser/in_memory_database.h',
+ 'history/core/browser/in_memory_url_index_types.cc',
+ 'history/core/browser/in_memory_url_index_types.h',
'history/core/browser/keyword_id.h',
'history/core/browser/keyword_search_term.cc',
'history/core/browser/keyword_search_term.h',
'history/core/browser/page_usage_data.cc',
'history/core/browser/page_usage_data.h',
+ 'history/core/browser/thumbnail_database.cc',
+ 'history/core/browser/thumbnail_database.h',
+ 'history/core/browser/top_sites_cache.cc',
+ 'history/core/browser/top_sites_cache.h',
'history/core/browser/top_sites_observer.h',
'history/core/browser/url_database.cc',
'history/core/browser/url_database.h',
'history/core/browser/url_row.cc',
'history/core/browser/url_row.h',
+ 'history/core/browser/url_utils.cc',
+ 'history/core/browser/url_utils.h',
+ 'history/core/browser/visit_database.cc',
+ 'history/core/browser/visit_database.h',
+ 'history/core/browser/visit_filter.cc',
+ 'history/core/browser/visit_filter.h',
+ 'history/core/browser/visit_tracker.cc',
+ 'history/core/browser/visit_tracker.h',
+ 'history/core/browser/visitsegment_database.cc',
+ 'history/core/browser/visitsegment_database.h',
],
},
{
+ # GN version: //components/history/core/browser:proto
+ # Protobuf compiler / generator for the InMemoryURLIndex caching
+ # protocol buffer.
+ 'target_name': 'history_core_browser_proto',
+ 'type': 'static_library',
+ 'sources': [
+ 'history/core/browser/in_memory_url_index_cache.proto',
+ ],
+ 'variables': {
+ 'proto_in_dir': 'history/core/browser',
+ 'proto_out_dir': 'components/history/core/browser',
+ },
+ 'includes': [ '../build/protoc.gypi' ]
+ },
+ {
# GN version: //components/history/core/common
'target_name': 'history_core_common',
'type': 'static_library',
diff --git a/components/history/DEPS b/components/history/DEPS
index 28b1e19..5bd6d8d 100644
--- a/components/history/DEPS
+++ b/components/history/DEPS
@@ -4,6 +4,7 @@ include_rules = [
"+components/query_parser",
"+net",
"+sql",
+ "+third_party/sqlite",
"+ui/base",
"+ui/gfx",
]
diff --git a/components/history/core/browser/BUILD.gn b/components/history/core/browser/BUILD.gn
index ca03f0b..977ea49 100644
--- a/components/history/core/browser/BUILD.gn
+++ b/components/history/core/browser/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//third_party/protobuf/proto_library.gni")
+
static_library("browser") {
sources = [
"history_backend_notifier.h",
@@ -18,16 +20,32 @@ static_library("browser") {
"history_types.h",
"in_memory_database.cc",
"in_memory_database.h",
+ "in_memory_url_index_types.cc",
+ "in_memory_url_index_types.h",
"keyword_id.h",
"keyword_search_term.cc",
"keyword_search_term.h",
"page_usage_data.cc",
"page_usage_data.h",
+ "thumbnail_database.cc",
+ "thumbnail_database.h",
+ "top_sites_cache.cc",
+ "top_sites_cache.h",
"top_sites_observer.h",
"url_database.cc",
"url_database.h",
"url_row.cc",
"url_row.h",
+ "url_utils.cc",
+ "url_utils.h",
+ "visit_database.cc",
+ "visit_database.h",
+ "visit_filter.cc",
+ "visit_filter.h",
+ "visit_tracker.cc",
+ "visit_tracker.h",
+ "visitsegment_database.cc",
+ "visitsegment_database.h",
]
deps = [
@@ -37,7 +55,15 @@ static_library("browser") {
"//components/query_parser",
"//net",
"//sql",
+ "//third_party/sqlite",
"//ui/base",
"//ui/gfx",
+ "//url",
+ ]
+}
+
+proto_library("proto") {
+ sources = [
+ "in_memory_url_index_cache.proto",
]
}
diff --git a/chrome/browser/history/in_memory_url_index_cache.proto b/components/history/core/browser/in_memory_url_index_cache.proto
index df2de1b..df2de1b 100644
--- a/chrome/browser/history/in_memory_url_index_cache.proto
+++ b/components/history/core/browser/in_memory_url_index_cache.proto
diff --git a/chrome/browser/history/in_memory_url_index_types.cc b/components/history/core/browser/in_memory_url_index_types.cc
index 4cc1d16..25907b3 100644
--- a/chrome/browser/history/in_memory_url_index_types.cc
+++ b/components/history/core/browser/in_memory_url_index_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/in_memory_url_index_types.h"
+#include "components/history/core/browser/in_memory_url_index_types.h"
#include <algorithm>
#include <functional>
diff --git a/chrome/browser/history/in_memory_url_index_types.h b/components/history/core/browser/in_memory_url_index_types.h
index bd23160..9390c26 100644
--- a/chrome/browser/history/in_memory_url_index_types.h
+++ b/components/history/core/browser/in_memory_url_index_types.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_TYPES_H_
-#define CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_TYPES_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_
#include <map>
#include <set>
@@ -176,4 +176,4 @@ typedef std::map<HistoryID, RowWordStarts> WordStartsMap;
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_TYPES_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_IN_MEMORY_URL_INDEX_TYPES_H_
diff --git a/chrome/browser/history/in_memory_url_index_types_unittest.cc b/components/history/core/browser/in_memory_url_index_types_unittest.cc
index 874fc62..b140491 100644
--- a/chrome/browser/history/in_memory_url_index_types_unittest.cc
+++ b/components/history/core/browser/in_memory_url_index_types_unittest.cc
@@ -2,11 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "components/history/core/browser/in_memory_url_index_types.h"
+
#include <algorithm>
#include "base/strings/string16.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/history/in_memory_url_index_types.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::UTF8ToUTF16;
diff --git a/chrome/browser/history/thumbnail_database.cc b/components/history/core/browser/thumbnail_database.cc
index 44ce287..551af76 100644
--- a/chrome/browser/history/thumbnail_database.cc
+++ b/components/history/core/browser/thumbnail_database.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/thumbnail_database.h"
+#include "components/history/core/browser/thumbnail_database.h"
#include <algorithm>
#include <string>
@@ -25,7 +25,7 @@
#include "sql/transaction.h"
#include "third_party/sqlite/sqlite3.h"
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && !defined(OS_IOS)
#include "base/mac/mac_util.h"
#endif
@@ -1171,7 +1171,7 @@ sql::InitStatus ThumbnailDatabase::InitImpl(const base::FilePath& db_name) {
// TODO(shess): Failing Begin() implies that something serious is
// wrong with the database. Raze() may be in order.
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && !defined(OS_IOS)
// Exclude the thumbnails file from backups.
base::mac::SetFileBackupExclusion(db_name);
#endif
diff --git a/chrome/browser/history/thumbnail_database.h b/components/history/core/browser/thumbnail_database.h
index 14942f1..16a5bd1 100644
--- a/chrome/browser/history/thumbnail_database.h
+++ b/components/history/core/browser/thumbnail_database.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
-#define CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_THUMBNAIL_DATABASE_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_THUMBNAIL_DATABASE_H_
#include <vector>
@@ -275,4 +275,4 @@ class ThumbnailDatabase {
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_THUMBNAIL_DATABASE_H_
diff --git a/chrome/browser/history/top_sites_cache.cc b/components/history/core/browser/top_sites_cache.cc
index 9b0f5e45..647dd01 100644
--- a/chrome/browser/history/top_sites_cache.cc
+++ b/components/history/core/browser/top_sites_cache.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/top_sites_cache.h"
+#include "components/history/core/browser/top_sites_cache.h"
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
diff --git a/chrome/browser/history/top_sites_cache.h b/components/history/core/browser/top_sites_cache.h
index de3ee6d..b88b51c 100644
--- a/chrome/browser/history/top_sites_cache.h
+++ b/components/history/core/browser/top_sites_cache.h
@@ -2,15 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_
-#define CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_CACHE_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_CACHE_H_
#include <map>
#include <utility>
#include "base/memory/ref_counted.h"
-#include "chrome/browser/history/url_utils.h"
#include "components/history/core/browser/history_types.h"
+#include "components/history/core/browser/url_utils.h"
#include "url/gurl.h"
class GURL;
@@ -167,4 +167,4 @@ class TopSitesCache {
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_TOP_SITES_CACHE_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_TOP_SITES_CACHE_H_
diff --git a/chrome/browser/history/top_sites_cache_unittest.cc b/components/history/core/browser/top_sites_cache_unittest.cc
index cc3eb79..30e7aeb 100644
--- a/chrome/browser/history/top_sites_cache_unittest.cc
+++ b/components/history/core/browser/top_sites_cache_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/top_sites_cache.h"
+#include "components/history/core/browser/top_sites_cache.h"
#include <set>
diff --git a/chrome/browser/history/url_utils.cc b/components/history/core/browser/url_utils.cc
index 0c7369a2..2f4a1f6 100644
--- a/chrome/browser/history/url_utils.cc
+++ b/components/history/core/browser/url_utils.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/url_utils.h"
+#include "components/history/core/browser/url_utils.h"
#include <algorithm>
@@ -31,7 +31,7 @@ int GetURLCharPriority(char ch) {
// as a separator, so e.g., "test" < "test-case" would be enforced by
// "test/..." < "test-case/...". We also force "?" < "/", so "test?query" <
// "test/stuff". Since the routine is merely lexicographical string comparison
-// with remapping of chracter ordering, so it is a valid strict-weak ordering.
+// with remapping of character ordering, so it is a valid strict-weak ordering.
bool CanonicalURLStringCompare(const std::string& s1, const std::string& s2) {
const std::string::value_type* ch1 = s1.c_str();
const std::string::value_type* ch2 = s2.c_str();
diff --git a/chrome/browser/history/url_utils.h b/components/history/core/browser/url_utils.h
index 9e1ed2c..e60eb4f 100644
--- a/chrome/browser/history/url_utils.h
+++ b/components/history/core/browser/url_utils.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_URL_UTILS_H_
-#define CHROME_BROWSER_HISTORY_URL_UTILS_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_
#include <string>
@@ -43,4 +43,4 @@ GURL ToggleHTTPAndHTTPS(const GURL& url);
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_URL_UTILS_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_URL_UTILS_H_
diff --git a/chrome/browser/history/url_utils_unittest.cc b/components/history/core/browser/url_utils_unittest.cc
index 970c5c0..184bd66 100644
--- a/chrome/browser/history/url_utils_unittest.cc
+++ b/components/history/core/browser/url_utils_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/url_utils.h"
+#include "components/history/core/browser/url_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
diff --git a/chrome/browser/history/visit_database.cc b/components/history/core/browser/visit_database.cc
index 3891d70..2a9234b 100644
--- a/chrome/browser/history/visit_database.cc
+++ b/components/history/core/browser/visit_database.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/visit_database.h"
+#include "components/history/core/browser/visit_database.h"
#include <algorithm>
#include <limits>
@@ -11,11 +11,11 @@
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
-#include "chrome/browser/history/visit_filter.h"
-#include "chrome/common/url_constants.h"
#include "components/history/core/browser/url_database.h"
+#include "components/history/core/browser/visit_filter.h"
#include "sql/statement.h"
#include "ui/base/page_transition_types.h"
+#include "url/url_constants.h"
namespace history {
diff --git a/chrome/browser/history/visit_database.h b/components/history/core/browser/visit_database.h
index 8f50848..58207ad 100644
--- a/chrome/browser/history/visit_database.h
+++ b/components/history/core/browser/visit_database.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
-#define CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
#include <vector>
@@ -230,4 +230,4 @@ class VisitDatabase {
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_VISIT_DATABASE_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
diff --git a/chrome/browser/history/visit_database_unittest.cc b/components/history/core/browser/visit_database_unittest.cc
index 98943f3..be2594a 100644
--- a/chrome/browser/history/visit_database_unittest.cc
+++ b/components/history/core/browser/visit_database_unittest.cc
@@ -9,8 +9,8 @@
#include "base/files/scoped_temp_dir.h"
#include "base/strings/string_util.h"
#include "base/time/time.h"
-#include "chrome/browser/history/visit_database.h"
#include "components/history/core/browser/url_database.h"
+#include "components/history/core/browser/visit_database.h"
#include "sql/connection.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
diff --git a/chrome/browser/history/visit_filter.cc b/components/history/core/browser/visit_filter.cc
index 9147dd73..1d1f152 100644
--- a/chrome/browser/history/visit_filter.cc
+++ b/components/history/core/browser/visit_filter.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/visit_filter.h"
+#include "components/history/core/browser/visit_filter.h"
#include <math.h>
diff --git a/chrome/browser/history/visit_filter.h b/components/history/core/browser/visit_filter.h
index deeacf3..01b9331 100644
--- a/chrome/browser/history/visit_filter.h
+++ b/components/history/core/browser/visit_filter.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_VISIT_FILTER_H_
-#define CHROME_BROWSER_HISTORY_VISIT_FILTER_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISIT_FILTER_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_FILTER_H_
#include <vector>
@@ -162,4 +162,4 @@ class VisitFilter {
} // history
-#endif // CHROME_BROWSER_HISTORY_VISIT_FILTER_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_FILTER_H_
diff --git a/chrome/browser/history/visit_filter_unittest.cc b/components/history/core/browser/visit_filter_unittest.cc
index 051a09e..0840ad5 100644
--- a/chrome/browser/history/visit_filter_unittest.cc
+++ b/components/history/core/browser/visit_filter_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/visit_filter.h"
+#include "components/history/core/browser/visit_filter.h"
#include <math.h>
diff --git a/chrome/browser/history/visit_tracker.cc b/components/history/core/browser/visit_tracker.cc
index c541d87..71d772f 100644
--- a/chrome/browser/history/visit_tracker.cc
+++ b/components/history/core/browser/visit_tracker.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/visit_tracker.h"
+#include "components/history/core/browser/visit_tracker.h"
#include "base/stl_util.h"
diff --git a/chrome/browser/history/visit_tracker.h b/components/history/core/browser/visit_tracker.h
index 890a889..29aefcf 100644
--- a/chrome/browser/history/visit_tracker.h
+++ b/components/history/core/browser/visit_tracker.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_VISIT_TRACKER_H__
-#define CHROME_BROWSER_HISTORY_VISIT_TRACKER_H__
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISIT_TRACKER_H__
+#define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_TRACKER_H__
#include <map>
#include <vector>
@@ -63,4 +63,4 @@ class VisitTracker {
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_VISIT_TRACKER_H__
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_TRACKER_H__
diff --git a/chrome/browser/history/visit_tracker_unittest.cc b/components/history/core/browser/visit_tracker_unittest.cc
index 4ed609c..bfd6bdb 100644
--- a/chrome/browser/history/visit_tracker_unittest.cc
+++ b/components/history/core/browser/visit_tracker_unittest.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/history/visit_tracker.h"
+#include "components/history/core/browser/visit_tracker.h"
+
#include "base/basictypes.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/history/visitsegment_database.cc b/components/history/core/browser/visitsegment_database.cc
index 3a54c3d..7beabd0 100644
--- a/chrome/browser/history/visitsegment_database.cc
+++ b/components/history/core/browser/visitsegment_database.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/visitsegment_database.h"
+#include "components/history/core/browser/visitsegment_database.h"
#include <math.h>
diff --git a/chrome/browser/history/visitsegment_database.h b/components/history/core/browser/visitsegment_database.h
index 2302978..a2aa156d 100644
--- a/chrome/browser/history/visitsegment_database.h
+++ b/components/history/core/browser/visitsegment_database.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H_
-#define CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H_
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISITSEGMENT_DATABASE_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_VISITSEGMENT_DATABASE_H_
#include "base/basictypes.h"
#include "components/history/core/browser/history_types.h"
@@ -89,4 +89,4 @@ class VisitSegmentDatabase {
} // namespace history
-#endif // CHROME_BROWSER_HISTORY_VISITSEGMENT_DATABASE_H_
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_VISITSEGMENT_DATABASE_H_