blob: e9deaa09793f7ab0bf264b8ff23fcc19449246e2 [file] [log] [blame]
// Copyright 2018 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 COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_LOCAL_CHANGES_BUILDER_H_
#define COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_LOCAL_CHANGES_BUILDER_H_
#include "components/sync/engine/commit_and_get_updates_types.h"
namespace bookmarks {
class BookmarkModel;
}
namespace sync_bookmarks {
class SyncedBookmarkTracker;
class BookmarkLocalChangesBuilder {
public:
// |bookmark_tracker| and |bookmark_model| must not be null and must outlive
// this object.
BookmarkLocalChangesBuilder(SyncedBookmarkTracker* bookmark_tracker,
bookmarks::BookmarkModel* bookmark_model);
BookmarkLocalChangesBuilder(const BookmarkLocalChangesBuilder&) = delete;
BookmarkLocalChangesBuilder& operator=(const BookmarkLocalChangesBuilder&) =
delete;
// Builds the commit requests list.
syncer::CommitRequestDataList BuildCommitRequests(size_t max_entries) const;
private:
SyncedBookmarkTracker* const bookmark_tracker_;
bookmarks::BookmarkModel* const bookmark_model_;
};
} // namespace sync_bookmarks
#endif // COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_LOCAL_CHANGES_BUILDER_H_