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 @@ ...@@ -22,6 +22,8 @@
typedef BookmarkClient::NodeTypedCountPair NodeTypedCountPair; typedef BookmarkClient::NodeTypedCountPair NodeTypedCountPair;
typedef BookmarkClient::NodeTypedCountPairs NodeTypedCountPairs; typedef BookmarkClient::NodeTypedCountPairs NodeTypedCountPairs;
namespace bookmarks {
namespace { namespace {
// Returns a normalized version of the UTF16 string |text|. If it fails to // Returns a normalized version of the UTF16 string |text|. If it fails to
...@@ -363,3 +365,5 @@ void BookmarkIndex::UnregisterNode(const base::string16& term, ...@@ -363,3 +365,5 @@ void BookmarkIndex::UnregisterNode(const base::string16& term,
if (i->second.empty()) if (i->second.empty())
index_.erase(i); index_.erase(i);
} }
} // namespace bookmarks
...@@ -18,6 +18,8 @@ class BookmarkClient; ...@@ -18,6 +18,8 @@ class BookmarkClient;
class BookmarkNode; class BookmarkNode;
struct BookmarkMatch; struct BookmarkMatch;
namespace bookmarks {
// BookmarkIndex maintains an index of the titles and URLs of bookmarks for // BookmarkIndex maintains an index of the titles and URLs of bookmarks for
// quick look up. BookmarkIndex is owned and maintained by BookmarkModel, you // quick look up. BookmarkIndex is owned and maintained by BookmarkModel, you
// shouldn't need to interact directly with BookmarkIndex. // shouldn't need to interact directly with BookmarkIndex.
...@@ -117,4 +119,6 @@ class BookmarkIndex { ...@@ -117,4 +119,6 @@ class BookmarkIndex {
DISALLOW_COPY_AND_ASSIGN(BookmarkIndex); DISALLOW_COPY_AND_ASSIGN(BookmarkIndex);
}; };
} // namespace bookmarks
#endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_INDEX_H_ #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_INDEX_H_
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
using base::ASCIIToUTF16; using base::ASCIIToUTF16;
using base::UTF8ToUTF16; using base::UTF8ToUTF16;
namespace bookmarks {
namespace { namespace {
const char kAboutBlankURL[] = "about:blank"; const char kAboutBlankURL[] = "about:blank";
...@@ -461,3 +462,4 @@ TEST_F(BookmarkIndexTest, GetResultsSortedByTypedCount) { ...@@ -461,3 +462,4 @@ TEST_F(BookmarkIndexTest, GetResultsSortedByTypedCount) {
} }
} // namespace } // namespace
} // namespace bookmarks
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "ui/gfx/favicon_size.h" #include "ui/gfx/favicon_size.h"
using base::Time; using base::Time;
using bookmarks::BookmarkIndex;
using bookmarks::BookmarkLoadDetails; using bookmarks::BookmarkLoadDetails;
using bookmarks::BookmarkStorage; using bookmarks::BookmarkStorage;
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include "url/gurl.h" #include "url/gurl.h"
class BookmarkExpandedStateTracker; class BookmarkExpandedStateTracker;
class BookmarkIndex;
class BookmarkModelObserver; class BookmarkModelObserver;
struct BookmarkMatch; struct BookmarkMatch;
class PrefService; class PrefService;
...@@ -36,6 +35,7 @@ class SequencedTaskRunner; ...@@ -36,6 +35,7 @@ class SequencedTaskRunner;
} }
namespace bookmarks { namespace bookmarks {
class BookmarkIndex;
class BookmarkLoadDetails; class BookmarkLoadDetails;
class BookmarkStorage; class BookmarkStorage;
class ScopedGroupBookmarkActions; class ScopedGroupBookmarkActions;
...@@ -409,7 +409,7 @@ class BookmarkModel : public BookmarkService { ...@@ -409,7 +409,7 @@ class BookmarkModel : public BookmarkService {
// Reads/writes bookmarks to disk. // Reads/writes bookmarks to disk.
scoped_refptr<bookmarks::BookmarkStorage> store_; 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 // True if URLs are stored in the BookmarkIndex in addition to bookmark
// titles. // titles.
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "components/bookmarks/browser/bookmark_node.h" #include "components/bookmarks/browser/bookmark_node.h"
class BookmarkIndex;
class BookmarkModel; class BookmarkModel;
namespace base { namespace base {
...@@ -20,6 +19,8 @@ class SequencedTaskRunner; ...@@ -20,6 +19,8 @@ class SequencedTaskRunner;
namespace bookmarks { namespace bookmarks {
class BookmarkIndex;
// BookmarkLoadDetails is used by BookmarkStorage when loading bookmarks. // BookmarkLoadDetails is used by BookmarkStorage when loading bookmarks.
// BookmarkModel creates a BookmarkLoadDetails and passes it (including // BookmarkModel creates a BookmarkLoadDetails and passes it (including
// ownership) to BookmarkStorage. BookmarkStorage loads the bookmarks (and // 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