summaryrefslogtreecommitdiffstats
path: root/components/bookmarks
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-27 01:26:15 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-27 01:26:15 +0000
commit5d4832f2c4c133ddad02a1b3d78163f82b5aa604 (patch)
tree318b39262d7c0f99d99d786f2e14b31a23a12a87 /components/bookmarks
parentbfa4953364c4e8a29eaf58f8630859c1c25eb424 (diff)
downloadchromium_src-5d4832f2c4c133ddad02a1b3d78163f82b5aa604.zip
chromium_src-5d4832f2c4c133ddad02a1b3d78163f82b5aa604.tar.gz
chromium_src-5d4832f2c4c133ddad02a1b3d78163f82b5aa604.tar.bz2
Move BookmarkClient into bookmarks namespace.
BUG=370433 TEST=None R=sky@chromium.org Review URL: https://codereview.chromium.org/352283002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/bookmarks')
-rw-r--r--components/bookmarks/browser/bookmark_client.cc4
-rw-r--r--components/bookmarks/browser/bookmark_client.h4
-rw-r--r--components/bookmarks/browser/bookmark_index.cc2
-rw-r--r--components/bookmarks/browser/bookmark_index.h2
-rw-r--r--components/bookmarks/browser/bookmark_model.cc1
-rw-r--r--components/bookmarks/browser/bookmark_model.h6
-rw-r--r--components/bookmarks/browser/bookmark_utils.cc1
-rw-r--r--components/bookmarks/browser/bookmark_utils.h7
-rw-r--r--components/bookmarks/browser/bookmark_utils_unittest.cc1
-rw-r--r--components/bookmarks/test/test_bookmark_client.h4
10 files changed, 24 insertions, 8 deletions
diff --git a/components/bookmarks/browser/bookmark_client.cc b/components/bookmarks/browser/bookmark_client.cc
index 6fbb2d0..a7bb764 100644
--- a/components/bookmarks/browser/bookmark_client.cc
+++ b/components/bookmarks/browser/bookmark_client.cc
@@ -6,6 +6,8 @@
#include "base/logging.h"
+namespace bookmarks {
+
bool BookmarkClient::PreferTouchIcon() {
return false;
}
@@ -28,3 +30,5 @@ void BookmarkClient::GetTypedCountForNodes(
NodeTypedCountPairs* node_typed_count_pairs) {
NOTREACHED();
}
+
+} // namespace bookmarks
diff --git a/components/bookmarks/browser/bookmark_client.h b/components/bookmarks/browser/bookmark_client.h
index 9a4d663..192d75ad 100644
--- a/components/bookmarks/browser/bookmark_client.h
+++ b/components/bookmarks/browser/bookmark_client.h
@@ -23,6 +23,8 @@ namespace base {
struct UserMetricsAction;
}
+namespace bookmarks {
+
// This class abstracts operations that depends on the embedder's environment,
// e.g. Chrome.
class BookmarkClient : public KeyedService {
@@ -86,4 +88,6 @@ class BookmarkClient : public KeyedService {
virtual ~BookmarkClient() {}
};
+} // namespace bookmarks
+
#endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CLIENT_H_
diff --git a/components/bookmarks/browser/bookmark_index.cc b/components/bookmarks/browser/bookmark_index.cc
index 2dd783f..282252a 100644
--- a/components/bookmarks/browser/bookmark_index.cc
+++ b/components/bookmarks/browser/bookmark_index.cc
@@ -19,6 +19,8 @@
#include "components/query_parser/snippet.h"
#include "third_party/icu/source/common/unicode/normalizer2.h"
+using bookmarks::BookmarkClient;
+
typedef BookmarkClient::NodeTypedCountPair NodeTypedCountPair;
typedef BookmarkClient::NodeTypedCountPairs NodeTypedCountPairs;
diff --git a/components/bookmarks/browser/bookmark_index.h b/components/bookmarks/browser/bookmark_index.h
index 3f09d0a..7087ba3 100644
--- a/components/bookmarks/browser/bookmark_index.h
+++ b/components/bookmarks/browser/bookmark_index.h
@@ -14,11 +14,11 @@
#include "base/strings/string16.h"
#include "components/query_parser/query_parser.h"
-class BookmarkClient;
class BookmarkNode;
namespace bookmarks {
+class BookmarkClient;
struct BookmarkMatch;
// BookmarkIndex maintains an index of the titles and URLs of bookmarks for
diff --git a/components/bookmarks/browser/bookmark_model.cc b/components/bookmarks/browser/bookmark_model.cc
index d5c9bdd..13cd1ee 100644
--- a/components/bookmarks/browser/bookmark_model.cc
+++ b/components/bookmarks/browser/bookmark_model.cc
@@ -26,6 +26,7 @@
#include "ui/gfx/favicon_size.h"
using base::Time;
+using bookmarks::BookmarkClient;
using bookmarks::BookmarkExpandedStateTracker;
using bookmarks::BookmarkIndex;
using bookmarks::BookmarkLoadDetails;
diff --git a/components/bookmarks/browser/bookmark_model.h b/components/bookmarks/browser/bookmark_model.h
index 848e82d..df68b9a 100644
--- a/components/bookmarks/browser/bookmark_model.h
+++ b/components/bookmarks/browser/bookmark_model.h
@@ -68,7 +68,7 @@ class BookmarkModel : public KeyedService {
// |index_urls| says whether URLs should be stored in the BookmarkIndex
// in addition to bookmark titles.
- BookmarkModel(BookmarkClient* client, bool index_urls);
+ BookmarkModel(bookmarks::BookmarkClient* client, bool index_urls);
virtual ~BookmarkModel();
// KeyedService:
@@ -285,7 +285,7 @@ class BookmarkModel : public KeyedService {
void OnFaviconChanged(const std::set<GURL>& urls);
// Returns the client used by this BookmarkModel.
- BookmarkClient* client() const { return client_; }
+ bookmarks::BookmarkClient* client() const { return client_; }
private:
friend class bookmarks::BookmarkCodecTest;
@@ -380,7 +380,7 @@ class BookmarkModel : public KeyedService {
scoped_ptr<bookmarks::BookmarkLoadDetails> CreateLoadDetails(
const std::string& accept_languages);
- BookmarkClient* const client_;
+ bookmarks::BookmarkClient* const client_;
// Whether the initial set of data has been loaded.
bool loaded_;
diff --git a/components/bookmarks/browser/bookmark_utils.cc b/components/bookmarks/browser/bookmark_utils.cc
index f0d561d..336a44d 100644
--- a/components/bookmarks/browser/bookmark_utils.cc
+++ b/components/bookmarks/browser/bookmark_utils.cc
@@ -25,6 +25,7 @@
#include "url/gurl.h"
using base::Time;
+using bookmarks::BookmarkClient;
namespace {
diff --git a/components/bookmarks/browser/bookmark_utils.h b/components/bookmarks/browser/bookmark_utils.h
index 5d11aac..d4c846f 100644
--- a/components/bookmarks/browser/bookmark_utils.h
+++ b/components/bookmarks/browser/bookmark_utils.h
@@ -12,11 +12,14 @@
#include "base/strings/utf_offset_string_conversions.h"
#include "components/bookmarks/browser/bookmark_node_data.h"
-class BookmarkClient;
class BookmarkModel;
class BookmarkNode;
class GURL;
+namespace bookmarks {
+class BookmarkClient;
+}
+
namespace user_prefs {
class PrefRegistrySyncable;
}
@@ -139,7 +142,7 @@ base::string16 CleanUpTitleForMatching(const base::string16& title);
// Returns true if all the |nodes| can be edited by the user,
// as determined by BookmarkClient::CanBeEditedByUser().
-bool CanAllBeEditedByUser(BookmarkClient* client,
+bool CanAllBeEditedByUser(bookmarks::BookmarkClient* client,
const std::vector<const BookmarkNode*>& nodes);
// Returns true if |url| has a bookmark in the |model| that can be edited
diff --git a/components/bookmarks/browser/bookmark_utils_unittest.cc b/components/bookmarks/browser/bookmark_utils_unittest.cc
index f6cd339..abea315 100644
--- a/components/bookmarks/browser/bookmark_utils_unittest.cc
+++ b/components/bookmarks/browser/bookmark_utils_unittest.cc
@@ -17,6 +17,7 @@
#include "ui/base/clipboard/scoped_clipboard_writer.h"
using base::ASCIIToUTF16;
+using bookmarks::BookmarkClient;
using std::string;
namespace bookmark_utils {
diff --git a/components/bookmarks/test/test_bookmark_client.h b/components/bookmarks/test/test_bookmark_client.h
index a83e976..bdaf86e 100644
--- a/components/bookmarks/test/test_bookmark_client.h
+++ b/components/bookmarks/test/test_bookmark_client.h
@@ -12,7 +12,7 @@ class BookmarkModel;
namespace test {
-class TestBookmarkClient : public BookmarkClient {
+class TestBookmarkClient : public bookmarks::BookmarkClient {
public:
TestBookmarkClient();
virtual ~TestBookmarkClient();
@@ -37,7 +37,7 @@ class TestBookmarkClient : public BookmarkClient {
bool IsAnExtraNode(const BookmarkNode* node);
private:
- // BookmarkClient:
+ // bookmarks::BookmarkClient:
virtual bool IsPermanentNodeVisible(
const BookmarkPermanentNode* node) OVERRIDE;
virtual void RecordAction(const base::UserMetricsAction& action) OVERRIDE;