summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history
diff options
context:
space:
mode:
authormrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-01 18:13:22 +0000
committermrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-01 18:13:22 +0000
commit279a25feea829758b83a82032100308d9f4606a8 (patch)
tree30133c122ba7cadfc88d2913ef9eac2d5a12c971 /chrome/browser/history
parent65d3438acf8e8e4f525c23b00c46b7a1330b00ee (diff)
downloadchromium_src-279a25feea829758b83a82032100308d9f4606a8.zip
chromium_src-279a25feea829758b83a82032100308d9f4606a8.tar.gz
chromium_src-279a25feea829758b83a82032100308d9f4606a8.tar.bz2
Add basic outline for the URL history autocompletion search provider.
BUG=None TEST=None Review URL: http://codereview.chromium.org/2850038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r--chrome/browser/history/in_memory_url_index.cc13
-rw-r--r--chrome/browser/history/in_memory_url_index.h23
-rw-r--r--chrome/browser/history/in_memory_url_index_unittest.cc22
3 files changed, 58 insertions, 0 deletions
diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc
new file mode 100644
index 0000000..83c401f
--- /dev/null
+++ b/chrome/browser/history/in_memory_url_index.cc
@@ -0,0 +1,13 @@
+// Copyright (c) 2010 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/in_memory_url_index.h"
+
+namespace history {
+
+InMemoryURLIndex::InMemoryURLIndex() {}
+
+InMemoryURLIndex::~InMemoryURLIndex() {}
+
+} // namespace history
diff --git a/chrome/browser/history/in_memory_url_index.h b/chrome/browser/history/in_memory_url_index.h
new file mode 100644
index 0000000..7b57a4a
--- /dev/null
+++ b/chrome/browser/history/in_memory_url_index.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 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_IN_MEMORY_URL_INDEX_H_
+#define CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_
+
+namespace history {
+
+// The URL history source.
+// Holds portions of the URL database in memory in an indexed form. Used to
+// quickly look up matching URLs for a given query string. Used by
+// the HistoryURLProvider for inline autocomplete and to provide URL
+// matches to the omnibox.
+class InMemoryURLIndex {
+ public:
+ InMemoryURLIndex();
+ ~InMemoryURLIndex();
+};
+
+} // namespace history
+
+#endif // CHROME_BROWSER_HISTORY_IN_MEMORY_URL_INDEX_H_
diff --git a/chrome/browser/history/in_memory_url_index_unittest.cc b/chrome/browser/history/in_memory_url_index_unittest.cc
new file mode 100644
index 0000000..f5932ef
--- /dev/null
+++ b/chrome/browser/history/in_memory_url_index_unittest.cc
@@ -0,0 +1,22 @@
+// Copyright (c) 2010 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/in_memory_url_index.h"
+
+#include "base/scoped_ptr.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace history {
+
+class InMemoryURLIndexTest : public testing::Test {
+ protected:
+ scoped_ptr<InMemoryURLIndex> url_index_;
+};
+
+TEST_F(InMemoryURLIndexTest, Construction) {
+ url_index_.reset(new InMemoryURLIndex);
+ EXPECT_TRUE(url_index_.get());
+}
+
+} // namespace history