android_webview
apps
ash
base
build
build_overrides
buildtools
cc
chrome
chromecast
chromeos
clank
codelabs
components
about_ui
access_code_cast
account_id
account_manager_core
aggregation_service
allocation_recorder
android_autofill
android_system_error_page
android_system_error_page_strings_grdp
apdu
app_constants
app_restore
arc
arc_strings_grdp
assist_ranker
attribution_reporting
autofill
autofill_payments_strings_grdp
autofill_strings_grdp
back_forward_cache
background_fetch
background_sync
background_task_scheduler
base32
blocked_content
blocklist
bookmark_bar_strings_grdp
bookmark_component_strings_grdp
bookmarks
breadcrumbs
browser_sync
BUILD.gn
DEPS
DIR_METADATA
OWNERS
PRESUBMIT.py
README.md
active_devices_provider_impl.cc
active_devices_provider_impl.h
active_devices_provider_impl_unittest.cc
browser_sync_client.h
browser_sync_switches.cc
browser_sync_switches.h
signin_confirmation_helper.cc
signin_confirmation_helper.h
sync_api_component_factory_impl.cc
sync_api_component_factory_impl.h
sync_client_utils.cc
sync_client_utils.h
sync_client_utils_unittest.cc
sync_to_signin_migration.cc
sync_to_signin_migration.h
sync_to_signin_migration_unittest.cc
browser_ui
browsing_data
browsing_data_strings_grdp
browsing_topics
captive_portal
capture_mode
cast
cast_receiver
cast_streaming
cbor
cdm
certificate_matching
certificate_transparency
chromeos_camera
client_hints
client_update_protocol
cloud_devices
color
commerce
commerce_strings_grdp
component_updater
components_chromium_strings_grd
components_google_chrome_strings_grd
components_strings_grd
compose
compose_strings_grdp
consent_auditor
constrained_window
content_capture
content_relationship_verification
content_settings
contextual_search
continuous_search
cookie_config
country_codes
crash
crash_strings_grdp
cronet
cross_device
crx_file
custom_handlers
database_utils
dbus
desks_storage
device_event_log
device_reauth
device_signals
devtools
digital_goods
discardable_memory
dom_distiller
dom_distiller_strings_grdp
domain_reliability
download
drive
embedder_support
encrypted_messages
endpoint_fetcher
enterprise
enterprise_strings_grdp
error_page
error_page_strings_grdp
exo
external_intents
external_intents_strings_grdp
externalauth
eye_dropper
facilitated_payments
favicon
favicon_base
feature_engagement
feed
feedback
file_access
filename_generation
find_in_page
flags_strings_grdp
flags_ui
fuchsia_component_support
fuchsia_legacymetrics
fullscreen_control
fullscreen_control_strings_grdp
gcm_driver
global_media_controls
global_media_controls_strings_grdp
google
grpc_support
guest_os
guest_view
gwp_asan
handoff
headless
heap_profiling
heavy_ad_intervention
heavy_ad_intervention_strings_grdp
history
history_clusters
history_clusters_strings_grdp
history_strings_grdp
image_fetcher
infobars
installedapp
invalidation
ip_protection_auth
javascript_dialogs
javascript_dialogs_strings_grdp
js_injection
keep_alive_registry
keyed_service
language
lens
leveldb_proto
link_header_util
live_caption
live_caption_strings_grdp
local_state
location
login
lookalikes
management
management_ios_strings_grdp
management_strings_grdp
manta
media_control
media_device_salt
media_effects
media_message_center
media_message_center_strings_grdp
media_router
memory_pressure
memory_system
messages
metal_util
metrics
metrics_services_manager
minidump_uploader
miracle_parameter
mirroring
ml
module_installer
nacl
named_mojo_ipc_server
navigation_interception
navigation_metrics
net_log
neterror
network_hints
network_session_configurator
network_time
new_or_sad_tab_strings_grdp
no_state_prefetch
ntp_snippets
ntp_tiles
offline_items_collection
offline_pages
omnibox
omnibox_pedal_ui_strings_grdp
omnibox_strings_grdp
on_load_script_injector
onc
open_from_clipboard
openscreen_platform
optimization_guide
origin_trials
os_crypt
ownership
page_image_annotation
page_image_service
page_info
page_info_strings_grdp
page_load_metrics
paint_preview
password_manager
password_manager_strings_grdp
payments
payments_strings_grdp
pdf
pdf_strings_grdp
performance_manager
permissions
permissions_strings_grdp
plugins
plus_addresses
plus_addresses_strings_grdp
policy
policy_strings_grdp
power_bookmarks
power_metrics
power_monitor
pref_registry
prefs
previous_session_info
print_media_strings_grdp
printing
printing_component_strings_grdp
privacy_sandbox
privacy_sandbox_strings_grdp
profile_metrics
proxy_config
pwg_encoder
qr_code_generator
query_parser
query_tiles
quirks
reading_list
reduce_accept_language
remote_cocoa
renderer_context_menu
reporting
reset_password_strings_grdp
resources
rlz
robolectric
safe_browsing
safe_search_api
safety_check
saved_tab_groups
schema_org
search
search_engine_choice_strings_grdp
search_engines
search_provider_logos
security_interstitials
security_interstitials_strings_grdp
security_state
segmentation_platform
send_tab_to_self
send_tab_to_self_strings_grdp
services
session_manager
session_proto_db
sessions
shared_highlighting
signin
site_engagement
site_isolation
site_settings_strings_grdp
sms_strings_grdp
soda
speech
spellcheck
sqlite_proto
ssl_errors
ssl_errors_strings_grdp
stability_report
startup_metric_utils
storage_monitor
strictmode
strings
stylus_handwriting
subresource_filter
subresource_filter_strings_grdp
supervised_user
supervised_user_strings_grdp
sync
sync_bookmarks
sync_device_info
sync_preferences
sync_sessions
sync_ui_strings_grdp
sync_user_events
system_media_controls
tab_groups
tab_groups_strings_grdp
test
thin_webview
tpcd
tracing
translate
translate_strings_grdp
trusted_vault
ui_devtools
ui_metrics
ukm
undo
undo_strings_grdp
unexportable_keys
unified_consent
update_client
upload_list
url_formatter
url_matcher
url_pattern_index
url_rewrite
user_actions_ui
user_education
user_education_strings_grdp
user_manager
user_notes
user_prefs
value_store
variations
vector_icons
version_info
version_ui
version_ui_strings_grdp
visitedlink
viz
web_app_resources
web_cache
web_modal
web_package
web_resource
webapk
webapps
webauthn
webcrypto
webdata
webdata_services
webrtc
webrtc_logging
webxr
webxr_strings_grdp
wifi
winhttp
zoom
zucchini
.eslintrc.js
BUILD.gn
DEPS
OWNERS
PRESUBMIT.py
README.md
android_system_error_page_strings.grdp
arc_strings.grdp
autofill_payments_strings.grdp
autofill_strings.grdp
blocked_content_strings.grdp
bookmark_bar_strings.grdp
bookmark_component_strings.grdp
browsing_data_strings.grdp
commerce_strings.grdp
components_chromium_strings.grd
components_google_chrome_strings.grd
components_locale_settings.grd
components_settings_strings.grdp
components_strings.grd
compose_strings.grdp
crash_strings.grdp
dialog_strings.grdp
dom_distiller_strings.grdp
enterprise_strings.grdp
error_page_strings.grdp
external_intents_strings.grdp
find_in_page_strings.grdp
flags_strings.grdp
fullscreen_control_strings.grdp
global_media_controls_strings.grdp
heavy_ad_intervention_strings.grdp
history_clusters_strings.grdp
history_strings.grdp
javascript_dialogs_strings.grdp
live_caption_strings.grdp
login_dialog_strings.grdp
management_ios_strings.grdp
management_strings.grdp
media_message_center_strings.grdp
new_or_sad_tab_strings.grdp
omnibox_pedal_ui_strings.grdp
omnibox_strings.grdp
page_info_strings.grdp
paint_preview_strings.grdp
password_manager_strings.grdp
payments_strings.grdp
pdf_strings.grdp
permissions_strings.grdp
plus_addresses_strings.grdp
policy_strings.grdp
print_media_strings.grdp
printing_component_strings.grdp
privacy_sandbox_strings.grdp
protocol_handler_strings.grdp
reset_password_strings.grdp
search_engine_choice_strings.grdp
search_engine_descriptions_strings.grd
security_interstitials_strings.grdp
send_tab_to_self_strings.grdp
site_settings_strings.grdp
sms_strings.grdp
ssl_errors_strings.grdp
subresource_filter_strings.grdp
supervised_user_strings.grdp
sync_ui_strings.grdp
tab_groups_strings.grdp
translate_strings.grdp
undo_strings.grdp
user_education_strings.grdp
version_ui_strings.grdp
webapps_strings.grdp
webxr_strings.grdp
content
courgette
crypto
dbus
device
docs
extensions
fuchsia_web
gin
google_apis
google_update
gpu
headless
infra
internal
ios
ios_internal
ipc
media
mojo
native_client
native_client_sdk
net
pdf
ppapi
printing
remoting
rlz
sandbox
services
signing_keys
skia
sql
storage
styleguide
testing
third_party
tools
ui
url
v8
webkit
.clang-format
.clang-tidy
.clangd
.eslintrc.js
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules
.gn
.mailmap
.rustfmt.toml
.vpython3
.yapfignore
ATL_OWNERS
AUTHORS
BUILD.gn
CODE_OF_CONDUCT.md
DEPS
DIR_METADATA
LICENSE
LICENSE.chromium_os
OWNERS
PRESUBMIT.py
PRESUBMIT_test.py
PRESUBMIT_test_mocks.py
README.md
WATCHLISTS
codereview.settings

The data types are enabled behind a feature toggle (disabled by default until sync bridges are implemented). Bug: 1445868 Change-Id: Id8b23755f18f3b73868a71d3b681da20bb9c6599 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4679690 Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org> Commit-Queue: Rushan Suleymanov <rushans@google.com> Reviewed-by: Marc Treib <treib@chromium.org> Cr-Commit-Position: refs/heads/main@{#1170144}
85 lines
2.7 KiB
C++
85 lines
2.7 KiB
C++
// Copyright 2019 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_BROWSER_SYNC_BROWSER_SYNC_CLIENT_H_
|
|
#define COMPONENTS_BROWSER_SYNC_BROWSER_SYNC_CLIENT_H_
|
|
|
|
#include "base/functional/callback_forward.h"
|
|
#include "base/memory/weak_ptr.h"
|
|
#include "components/sync/model/model_type_controller_delegate.h"
|
|
#include "components/sync/service/sync_client.h"
|
|
|
|
namespace favicon {
|
|
class FaviconService;
|
|
} // namespace favicon
|
|
|
|
namespace history {
|
|
class HistoryService;
|
|
} // namespace history
|
|
|
|
class ReadingListModel;
|
|
|
|
namespace password_manager {
|
|
class PasswordReceiverService;
|
|
class PasswordSenderService;
|
|
} // namespace password_manager
|
|
|
|
namespace send_tab_to_self {
|
|
class SendTabToSelfSyncService;
|
|
} // namespace send_tab_to_self
|
|
|
|
namespace sync_preferences {
|
|
class PrefServiceSyncable;
|
|
} // namespace sync_preferences
|
|
|
|
namespace sync_sessions {
|
|
class SessionSyncService;
|
|
} // namespace sync_sessions
|
|
|
|
namespace syncer {
|
|
class DeviceInfoSyncService;
|
|
class ModelTypeStoreService;
|
|
} // namespace syncer
|
|
|
|
namespace browser_sync {
|
|
|
|
// Extension to interface syncer::SyncClient to bundle dependencies that
|
|
// sync-the-feature requires for datatypes common to all platforms.
|
|
// Note: on some platforms, getters might return nullptr. Callers are expected
|
|
// to handle these scenarios gracefully.
|
|
class BrowserSyncClient : public syncer::SyncClient {
|
|
public:
|
|
BrowserSyncClient() = default;
|
|
|
|
BrowserSyncClient(const BrowserSyncClient&) = delete;
|
|
BrowserSyncClient& operator=(const BrowserSyncClient&) = delete;
|
|
|
|
~BrowserSyncClient() override = default;
|
|
|
|
virtual syncer::ModelTypeStoreService* GetModelTypeStoreService() = 0;
|
|
|
|
// Returns a weak pointer to the ModelTypeControllerDelegate specified by
|
|
// |type|. Weak pointer may be unset if service is already destroyed.
|
|
virtual base::WeakPtr<syncer::ModelTypeControllerDelegate>
|
|
GetControllerDelegateForModelType(syncer::ModelType type) = 0;
|
|
|
|
// DataType specific service getters.
|
|
virtual syncer::DeviceInfoSyncService* GetDeviceInfoSyncService() = 0;
|
|
virtual favicon::FaviconService* GetFaviconService() = 0;
|
|
virtual history::HistoryService* GetHistoryService() = 0;
|
|
virtual password_manager::PasswordReceiverService*
|
|
GetPasswordReceiverService() = 0;
|
|
virtual password_manager::PasswordSenderService*
|
|
GetPasswordSenderService() = 0;
|
|
virtual sync_preferences::PrefServiceSyncable* GetPrefServiceSyncable() = 0;
|
|
virtual sync_sessions::SessionSyncService* GetSessionSyncService() = 0;
|
|
virtual ReadingListModel* GetReadingListModel() = 0;
|
|
virtual send_tab_to_self::SendTabToSelfSyncService*
|
|
GetSendTabToSelfSyncService() = 0;
|
|
};
|
|
|
|
} // namespace browser_sync
|
|
|
|
#endif // COMPONENTS_BROWSER_SYNC_BROWSER_SYNC_CLIENT_H_
|