summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblundell <blundell@chromium.org>2015-06-16 03:47:08 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-16 10:47:38 +0000
commit0235a503e4c2580b85b11f42fc26b98b0e5e2e4d (patch)
tree34a90e33068a1b4a7d8438d078f293621385e9a5
parent0ff8251c76b66e56f86c4f842f8aad34836c95bc (diff)
downloadchromium_src-0235a503e4c2580b85b11f42fc26b98b0e5e2e4d.zip
chromium_src-0235a503e4c2580b85b11f42fc26b98b0e5e2e4d.tar.gz
chromium_src-0235a503e4c2580b85b11f42fc26b98b0e5e2e4d.tar.bz2
Componentize HistoryProvider.
BUG=371538 Review URL: https://codereview.chromium.org/1184783002 Cr-Commit-Position: refs/heads/master@{#334582}
-rw-r--r--chrome/browser/autocomplete/bookmark_provider.cc2
-rw-r--r--chrome/browser/autocomplete/builtin_provider.cc2
-rw-r--r--chrome/browser/autocomplete/history_quick_provider.h2
-rw-r--r--chrome/browser/autocomplete/history_url_provider.h2
-rw-r--r--chrome/browser/autocomplete/shortcuts_provider.cc2
-rw-r--r--chrome/chrome_browser.gypi6
-rw-r--r--components/omnibox.gypi3
-rw-r--r--components/omnibox/BUILD.gn3
-rw-r--r--components/omnibox/DEPS3
-rw-r--r--components/omnibox/history_provider.cc (renamed from chrome/browser/autocomplete/history_provider.cc)2
-rw-r--r--components/omnibox/history_provider.h (renamed from chrome/browser/autocomplete/history_provider.h)6
11 files changed, 19 insertions, 14 deletions
diff --git a/chrome/browser/autocomplete/bookmark_provider.cc b/chrome/browser/autocomplete/bookmark_provider.cc
index 297089d..f9d673c 100644
--- a/chrome/browser/autocomplete/bookmark_provider.cc
+++ b/chrome/browser/autocomplete/bookmark_provider.cc
@@ -12,7 +12,6 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
-#include "chrome/browser/autocomplete/history_provider.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
@@ -20,6 +19,7 @@
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
#include "components/omnibox/autocomplete_result.h"
+#include "components/omnibox/history_provider.h"
#include "components/omnibox/url_prefix.h"
#include "net/base/net_util.h"
#include "url/url_constants.h"
diff --git a/chrome/browser/autocomplete/builtin_provider.cc b/chrome/browser/autocomplete/builtin_provider.cc
index 6710e159..e7fcf93 100644
--- a/chrome/browser/autocomplete/builtin_provider.cc
+++ b/chrome/browser/autocomplete/builtin_provider.cc
@@ -8,10 +8,10 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/autocomplete/history_provider.h"
#include "chrome/common/url_constants.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
#include "components/omnibox/autocomplete_input.h"
+#include "components/omnibox/history_provider.h"
#include "components/url_fixer/url_fixer.h"
namespace {
diff --git a/chrome/browser/autocomplete/history_quick_provider.h b/chrome/browser/autocomplete/history_quick_provider.h
index b31f05e..9b4e678 100644
--- a/chrome/browser/autocomplete/history_quick_provider.h
+++ b/chrome/browser/autocomplete/history_quick_provider.h
@@ -9,11 +9,11 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/autocomplete/history_provider.h"
#include "chrome/browser/autocomplete/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"
+#include "components/omnibox/history_provider.h"
class Profile;
struct ScoredHistoryMatch;
diff --git a/chrome/browser/autocomplete/history_url_provider.h b/chrome/browser/autocomplete/history_url_provider.h
index a5ce380..75f5a60 100644
--- a/chrome/browser/autocomplete/history_url_provider.h
+++ b/chrome/browser/autocomplete/history_url_provider.h
@@ -10,9 +10,9 @@
#include "base/compiler_specific.h"
#include "base/synchronization/cancellation_flag.h"
-#include "chrome/browser/autocomplete/history_provider.h"
#include "components/history/core/browser/history_match.h"
#include "components/omnibox/autocomplete_input.h"
+#include "components/omnibox/history_provider.h"
#include "components/omnibox/omnibox_field_trial.h"
#include "components/search_engines/template_url.h"
diff --git a/chrome/browser/autocomplete/shortcuts_provider.cc b/chrome/browser/autocomplete/shortcuts_provider.cc
index dc46d0c..e98a218 100644
--- a/chrome/browser/autocomplete/shortcuts_provider.cc
+++ b/chrome/browser/autocomplete/shortcuts_provider.cc
@@ -18,7 +18,6 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
-#include "chrome/browser/autocomplete/history_provider.h"
#include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -30,6 +29,7 @@
#include "components/omnibox/autocomplete_input.h"
#include "components/omnibox/autocomplete_match.h"
#include "components/omnibox/autocomplete_result.h"
+#include "components/omnibox/history_provider.h"
#include "components/omnibox/omnibox_field_trial.h"
#include "components/omnibox/url_prefix.h"
#include "components/url_fixer/url_fixer.h"
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 372da3c..b5f7744 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -216,10 +216,10 @@
'browser/android/voice_search_tab_helper.h',
'browser/android/warmup_manager.cc',
'browser/android/warmup_manager.h',
- 'browser/android/webapps/single_tab_mode_tab_helper.cc',
- 'browser/android/webapps/single_tab_mode_tab_helper.h',
'browser/android/web_contents_factory.cc',
'browser/android/web_contents_factory.h',
+ 'browser/android/webapps/single_tab_mode_tab_helper.cc',
+ 'browser/android/webapps/single_tab_mode_tab_helper.h',
'browser/app_controller_mac.h',
'browser/app_controller_mac.mm',
'browser/app_icon_win.cc',
@@ -1275,8 +1275,6 @@
'browser/autocomplete/chrome_autocomplete_provider_client.h',
'browser/autocomplete/chrome_autocomplete_scheme_classifier.cc',
'browser/autocomplete/chrome_autocomplete_scheme_classifier.h',
- 'browser/autocomplete/history_provider.cc',
- 'browser/autocomplete/history_provider.h',
'browser/autocomplete/history_quick_provider.cc',
'browser/autocomplete/history_quick_provider.h',
'browser/autocomplete/history_url_provider.cc',
diff --git a/components/omnibox.gypi b/components/omnibox.gypi
index 1e1e1cf..61bd261 100644
--- a/components/omnibox.gypi
+++ b/components/omnibox.gypi
@@ -14,6 +14,7 @@
'../net/net.gyp:net',
'../ui/base/ui_base.gyp:ui_base',
'../url/url.gyp:url_lib',
+ 'bookmarks_browser',
'component_metrics_proto',
'components_resources.gyp:components_resources',
'components_strings.gyp:components_strings',
@@ -48,6 +49,8 @@
'omnibox/autocomplete_scheme_classifier.h',
'omnibox/base_search_provider.cc',
'omnibox/base_search_provider.h',
+ 'omnibox/history_provider.cc',
+ 'omnibox/history_provider.h',
'omnibox/in_memory_url_index_types.cc',
'omnibox/in_memory_url_index_types.h',
'omnibox/keyword_extensions_delegate.cc',
diff --git a/components/omnibox/BUILD.gn b/components/omnibox/BUILD.gn
index b5c3a32..d633d28 100644
--- a/components/omnibox/BUILD.gn
+++ b/components/omnibox/BUILD.gn
@@ -19,6 +19,8 @@ static_library("omnibox") {
"autocomplete_scheme_classifier.h",
"base_search_provider.cc",
"base_search_provider.h",
+ "history_provider.cc",
+ "history_provider.h",
"in_memory_url_index_types.cc",
"in_memory_url_index_types.h",
"keyword_extensions_delegate.cc",
@@ -47,6 +49,7 @@ static_library("omnibox") {
deps = [
"//base",
"//base:i18n",
+ "//components/bookmarks/browser",
"//components/history/core/browser",
"//components/resources",
"//components/search",
diff --git a/components/omnibox/DEPS b/components/omnibox/DEPS
index 7809f1f..6413f71 100644
--- a/components/omnibox/DEPS
+++ b/components/omnibox/DEPS
@@ -1,5 +1,6 @@
include_rules = [
- "+components/history",
+ "+components/bookmarks/browser",
+ "+components/history/core/browser",
"+components/metrics/proto",
"+components/search",
"+components/search_engines",
diff --git a/chrome/browser/autocomplete/history_provider.cc b/components/omnibox/history_provider.cc
index 32b965b..9c00f05 100644
--- a/chrome/browser/autocomplete/history_provider.cc
+++ b/components/omnibox/history_provider.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/autocomplete/history_provider.h"
+#include "components/omnibox/history_provider.h"
#include <string>
diff --git a/chrome/browser/autocomplete/history_provider.h b/components/omnibox/history_provider.h
index b830397..e7ed8d2 100644
--- a/chrome/browser/autocomplete/history_provider.h
+++ b/components/omnibox/history_provider.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_AUTOCOMPLETE_HISTORY_PROVIDER_H_
-#define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_
+#ifndef COMPONENTS_OMNIBOX_HISTORY_PROVIDER_H_
+#define COMPONENTS_OMNIBOX_HISTORY_PROVIDER_H_
#include "base/compiler_specific.h"
#include "components/omnibox/autocomplete_provider.h"
@@ -49,4 +49,4 @@ class HistoryProvider : public AutocompleteProvider {
DISALLOW_COPY_AND_ASSIGN(HistoryProvider);
};
-#endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_
+#endif // COMPONENTS_OMNIBOX_HISTORY_PROVIDER_H_