Commit c45f5623 authored by tfarina@chromium.org's avatar tfarina@chromium.org

Move BookmarkIndex into bookmarks namespace.

BUG=370433
TEST=None
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/307203002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274147 0039d316-1c4b-4281-b951-d872f2087c98
parent a36a98a2
......@@ -22,6 +22,8 @@
typedef BookmarkClient::NodeTypedCountPair NodeTypedCountPair;
typedef BookmarkClient::NodeTypedCountPairs NodeTypedCountPairs;
namespace bookmarks {
namespace {
// Returns a normalized version of the UTF16 string |text|. If it fails to
......@@ -363,3 +365,5 @@ void BookmarkIndex::UnregisterNode(const base::string16& term,
if (i->second.empty())
index_.erase(i);
}
} // namespace bookmarks
......@@ -18,6 +18,8 @@ class BookmarkClient;
class BookmarkNode;
struct BookmarkMatch;
namespace bookmarks {
// BookmarkIndex maintains an index of the titles and URLs of bookmarks for
// quick look up. BookmarkIndex is owned and maintained by BookmarkModel, you
// shouldn't need to interact directly with BookmarkIndex.
......@@ -117,4 +119,6 @@ class BookmarkIndex {
DISALLOW_COPY_AND_ASSIGN(BookmarkIndex);
};
} // namespace bookmarks
#endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_INDEX_H_
......@@ -21,6 +21,7 @@
using base::ASCIIToUTF16;
using base::UTF8ToUTF16;
namespace bookmarks {
namespace {
const char kAboutBlankURL[] = "about:blank";
......@@ -461,3 +462,4 @@ TEST_F(BookmarkIndexTest, GetResultsSortedByTypedCount) {
}
} // namespace
} // namespace bookmarks
......@@ -26,6 +26,7 @@
#include "ui/gfx/favicon_size.h"
using base::Time;
using bookmarks::BookmarkIndex;
using bookmarks::BookmarkLoadDetails;
using bookmarks::BookmarkStorage;
......
......@@ -24,7 +24,6 @@
#include "url/gurl.h"
class BookmarkExpandedStateTracker;
class BookmarkIndex;
class BookmarkModelObserver;
struct BookmarkMatch;
class PrefService;
......@@ -36,6 +35,7 @@ class SequencedTaskRunner;
}
namespace bookmarks {
class BookmarkIndex;
class BookmarkLoadDetails;
class BookmarkStorage;
class ScopedGroupBookmarkActions;
......@@ -409,7 +409,7 @@ class BookmarkModel : public BookmarkService {
// Reads/writes bookmarks to disk.
scoped_refptr<bookmarks::BookmarkStorage> store_;
scoped_ptr<BookmarkIndex> index_;
scoped_ptr<bookmarks::BookmarkIndex> index_;
// True if URLs are stored in the BookmarkIndex in addition to bookmark
// titles.
......
......@@ -11,7 +11,6 @@
#include "base/memory/scoped_ptr.h"
#include "components/bookmarks/browser/bookmark_node.h"
class BookmarkIndex;
class BookmarkModel;
namespace base {
......@@ -20,6 +19,8 @@ class SequencedTaskRunner;
namespace bookmarks {
class BookmarkIndex;
// BookmarkLoadDetails is used by BookmarkStorage when loading bookmarks.
// BookmarkModel creates a BookmarkLoadDetails and passes it (including
// ownership) to BookmarkStorage. BookmarkStorage loads the bookmarks (and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment