diff options
-rw-r--r-- | chrome/browser/history/in_memory_url_index.cc | 13 | ||||
-rw-r--r-- | chrome/browser/history/in_memory_url_index.h | 23 | ||||
-rw-r--r-- | chrome/browser/history/in_memory_url_index_unittest.cc | 22 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 1 |
5 files changed, 61 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 diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index ffbb693..6e7753a 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -1581,6 +1581,8 @@ 'browser/history/in_memory_database.h', 'browser/history/in_memory_history_backend.cc', 'browser/history/in_memory_history_backend.h', + 'browser/history/in_memory_url_index.cc', + 'browser/history/in_memory_url_index.h', 'browser/history/page_usage_data.cc', 'browser/history/page_usage_data.h', 'browser/history/query_parser.cc', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 290fc4e..f126f52 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -842,6 +842,7 @@ 'browser/history/history_querying_unittest.cc', 'browser/history/history_types_unittest.cc', 'browser/history/history_unittest.cc', + 'browser/history/in_memory_url_index_unittest.cc', 'browser/history/query_parser_unittest.cc', 'browser/history/snippet_unittest.cc', 'browser/history/starred_url_database_unittest.cc', |