#include "components/history/core/test/history_client_fake_bookmarks.h"
#include <map>
#include <memory>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "components/history/core/browser/history_backend_client.h"
#include "url/gurl.h"
namespace history {
class FakeBookmarkDatabase
: public base::RefCountedThreadSafe<FakeBookmarkDatabase> { … };
void FakeBookmarkDatabase::ClearAllBookmarks() { … }
void FakeBookmarkDatabase::AddBookmarkWithTitle(const GURL& url,
const std::u16string& title) { … }
void FakeBookmarkDatabase::DelBookmark(const GURL& url) { … }
bool FakeBookmarkDatabase::IsBookmarked(const GURL& url) { … }
std::vector<URLAndTitle> FakeBookmarkDatabase::GetBookmarks() { … }
namespace {
class HistoryBackendClientFakeBookmarks : public HistoryBackendClient { … };
HistoryBackendClientFakeBookmarks::HistoryBackendClientFakeBookmarks(
const scoped_refptr<FakeBookmarkDatabase>& bookmarks)
: … { … }
HistoryBackendClientFakeBookmarks::~HistoryBackendClientFakeBookmarks() { … }
bool HistoryBackendClientFakeBookmarks::IsPinnedURL(const GURL& url) { … }
std::vector<URLAndTitle> HistoryBackendClientFakeBookmarks::GetPinnedURLs() { … }
bool HistoryBackendClientFakeBookmarks::IsWebSafe(const GURL& url) { … }
}
HistoryClientFakeBookmarks::HistoryClientFakeBookmarks() { … }
HistoryClientFakeBookmarks::~HistoryClientFakeBookmarks() { … }
void HistoryClientFakeBookmarks::ClearAllBookmarks() { … }
void HistoryClientFakeBookmarks::AddBookmark(const GURL& url) { … }
void HistoryClientFakeBookmarks::AddBookmarkWithTitle(
const GURL& url,
const std::u16string& title) { … }
void HistoryClientFakeBookmarks::DelBookmark(const GURL& url) { … }
bool HistoryClientFakeBookmarks::IsBookmarked(const GURL& url) { … }
void HistoryClientFakeBookmarks::OnHistoryServiceCreated(
HistoryService* history_service) { … }
void HistoryClientFakeBookmarks::Shutdown() { … }
CanAddURLCallback HistoryClientFakeBookmarks::GetThreadSafeCanAddURLCallback()
const { … }
void HistoryClientFakeBookmarks::NotifyProfileError(
sql::InitStatus init_status,
const std::string& diagnostics) { … }
std::unique_ptr<HistoryBackendClient>
HistoryClientFakeBookmarks::CreateBackendClient() { … }
void HistoryClientFakeBookmarks::UpdateBookmarkLastUsedTime(
int64_t bookmark_node_id,
base::Time time) { … }
}