// Copyright 2022 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_READING_LIST_CORE_DUAL_READING_LIST_MODEL_H_ #define COMPONENTS_READING_LIST_CORE_DUAL_READING_LIST_MODEL_H_ #include <map> #include <memory> #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" #include "base/observer_list.h" #include "base/sequence_checker.h" #include "components/reading_list/core/reading_list_entry.h" #include "components/reading_list/core/reading_list_model.h" #include "components/reading_list/core/reading_list_model_impl.h" #include "components/reading_list/core/reading_list_model_observer.h" #include "google_apis/gaia/core_account_id.h" #include "url/gurl.h" namespace reading_list { // ReadingListModel implementation that is capable of providing a merged view of // two underlying instances of ReadingListModel. For newly-created entries, the // class determines internally and based on sign-in & sync state, which // instance should be used. It is useful to support sync-the-transport use-cases // where the user is signed in but has sync turned off: in this case the two // data sources (local entries and entries server-side) should be treated // independently under the hood, but an in-memory merged view can be presented // to UI layers and generally feature integrations. class DualReadingListModel : public ReadingListModel, public ReadingListModelObserver { … }; } // namespace reading_list #endif // COMPONENTS_READING_LIST_CORE_DUAL_READING_LIST_MODEL_H_