| Index: components/sync_sessions/sessions_sync_manager.cc
|
| diff --git a/components/sync_sessions/sessions_sync_manager.cc b/components/sync_sessions/sessions_sync_manager.cc
|
| index dc0665ceaaeb42dc99040ad649a2987b592463ce..5e7c19d018b24450596938edffe0cfa8e9af036d 100644
|
| --- a/components/sync_sessions/sessions_sync_manager.cc
|
| +++ b/components/sync_sessions/sessions_sync_manager.cc
|
| @@ -28,7 +28,7 @@ using sync_driver::LocalDeviceInfoProvider;
|
| using syncer::SyncChange;
|
| using syncer::SyncData;
|
|
|
| -namespace browser_sync {
|
| +namespace sync_sessions {
|
|
|
| namespace {
|
|
|
| @@ -56,8 +56,8 @@ bool TabsRecencyComparator(const sessions::SessionTab* t1,
|
|
|
| // Comparator function for use with std::sort that will sort sessions by
|
| // descending modified_time (i.e., most recent first).
|
| -bool SessionsRecencyComparator(const sync_driver::SyncedSession* s1,
|
| - const sync_driver::SyncedSession* s2) {
|
| +bool SessionsRecencyComparator(const SyncedSession* s1,
|
| + const SyncedSession* s2) {
|
| return s1->modified_time > s2->modified_time;
|
| }
|
|
|
| @@ -77,7 +77,7 @@ std::string TagFromSpecifics(const sync_pb::SessionSpecifics& specifics) {
|
| // |local_device| is owned by ProfileSyncService, its lifetime exceeds
|
| // lifetime of SessionSyncManager.
|
| SessionsSyncManager::SessionsSyncManager(
|
| - sync_sessions::SyncSessionsClient* sessions_client,
|
| + SyncSessionsClient* sessions_client,
|
| sync_driver::SyncPrefs* sync_prefs,
|
| LocalDeviceInfoProvider* local_device,
|
| std::unique_ptr<LocalSessionEventRouter> router,
|
| @@ -187,8 +187,7 @@ void SessionsSyncManager::AssociateWindows(
|
| sync_pb::SessionSpecifics specifics;
|
| specifics.set_session_tag(local_tag);
|
| sync_pb::SessionHeader* header_s = specifics.mutable_header();
|
| - sync_driver::SyncedSession* current_session =
|
| - session_tracker_.GetSession(local_tag);
|
| + SyncedSession* current_session = session_tracker_.GetSession(local_tag);
|
| current_session->modified_time = base::Time::Now();
|
| header_s->set_client_name(current_session_name_);
|
| // SessionDataTypeController ensures that the local device info
|
| @@ -450,7 +449,7 @@ void SessionsSyncManager::StopSyncing(syncer::ModelType type) {
|
| syncer::SyncDataList SessionsSyncManager::GetAllSyncData(
|
| syncer::ModelType type) const {
|
| syncer::SyncDataList list;
|
| - const sync_driver::SyncedSession* session = NULL;
|
| + const SyncedSession* session = NULL;
|
| if (!session_tracker_.LookupLocalSession(&session))
|
| return syncer::SyncDataList();
|
|
|
| @@ -464,7 +463,7 @@ syncer::SyncDataList SessionsSyncManager::GetAllSyncData(
|
| current_machine_tag(), current_session_name_, header_entity);
|
| list.push_back(data);
|
|
|
| - sync_driver::SyncedSession::SyncedWindowMap::const_iterator win_iter;
|
| + SyncedSession::SyncedWindowMap::const_iterator win_iter;
|
| for (win_iter = session->windows.begin(); win_iter != session->windows.end();
|
| ++win_iter) {
|
| std::vector<sessions::SessionTab*>::const_iterator tabs_iter;
|
| @@ -489,8 +488,7 @@ syncer::SyncDataList SessionsSyncManager::GetAllSyncData(
|
| return list;
|
| }
|
|
|
| -bool SessionsSyncManager::GetLocalSession(
|
| - const sync_driver::SyncedSession** local_session) {
|
| +bool SessionsSyncManager::GetLocalSession(const SyncedSession** local_session) {
|
| if (current_machine_tag_.empty())
|
| return false;
|
| *local_session = session_tracker_.GetSession(current_machine_tag());
|
| @@ -579,7 +577,7 @@ syncer::SyncChange SessionsSyncManager::TombstoneTab(
|
| }
|
|
|
| bool SessionsSyncManager::GetAllForeignSessions(
|
| - std::vector<const sync_driver::SyncedSession*>* sessions) {
|
| + std::vector<const SyncedSession*>* sessions) {
|
| if (!session_tracker_.LookupAllForeignSessions(
|
| sessions, SyncedSessionTracker::PRESENTABLE))
|
| return false;
|
| @@ -645,7 +643,7 @@ bool SessionsSyncManager::InitFromSyncModel(
|
|
|
| // Cleanup all foreign sessions, since orphaned tabs may have been added after
|
| // the header.
|
| - std::vector<const sync_driver::SyncedSession*> sessions;
|
| + std::vector<const SyncedSession*> sessions;
|
| session_tracker_.LookupAllForeignSessions(&sessions,
|
| SyncedSessionTracker::RAW);
|
| for (const auto* session : sessions) {
|
| @@ -664,7 +662,7 @@ void SessionsSyncManager::UpdateTrackerWithForeignSession(
|
| std::string foreign_session_tag = specifics.session_tag();
|
| DCHECK_NE(foreign_session_tag, current_machine_tag());
|
|
|
| - sync_driver::SyncedSession* foreign_session =
|
| + SyncedSession* foreign_session =
|
| session_tracker_.GetSession(foreign_session_tag);
|
| if (specifics.has_header()) {
|
| // Read in the header data for this foreign session. Header data is
|
| @@ -761,33 +759,33 @@ void SessionsSyncManager::InitializeCurrentMachineTag() {
|
| void SessionsSyncManager::PopulateSessionHeaderFromSpecifics(
|
| const sync_pb::SessionHeader& header_specifics,
|
| base::Time mtime,
|
| - sync_driver::SyncedSession* session_header) {
|
| + SyncedSession* session_header) {
|
| if (header_specifics.has_client_name())
|
| session_header->session_name = header_specifics.client_name();
|
| if (header_specifics.has_device_type()) {
|
| switch (header_specifics.device_type()) {
|
| case sync_pb::SyncEnums_DeviceType_TYPE_WIN:
|
| - session_header->device_type = sync_driver::SyncedSession::TYPE_WIN;
|
| + session_header->device_type = SyncedSession::TYPE_WIN;
|
| break;
|
| case sync_pb::SyncEnums_DeviceType_TYPE_MAC:
|
| - session_header->device_type = sync_driver::SyncedSession::TYPE_MACOSX;
|
| + session_header->device_type = SyncedSession::TYPE_MACOSX;
|
| break;
|
| case sync_pb::SyncEnums_DeviceType_TYPE_LINUX:
|
| - session_header->device_type = sync_driver::SyncedSession::TYPE_LINUX;
|
| + session_header->device_type = SyncedSession::TYPE_LINUX;
|
| break;
|
| case sync_pb::SyncEnums_DeviceType_TYPE_CROS:
|
| - session_header->device_type = sync_driver::SyncedSession::TYPE_CHROMEOS;
|
| + session_header->device_type = SyncedSession::TYPE_CHROMEOS;
|
| break;
|
| case sync_pb::SyncEnums_DeviceType_TYPE_PHONE:
|
| - session_header->device_type = sync_driver::SyncedSession::TYPE_PHONE;
|
| + session_header->device_type = SyncedSession::TYPE_PHONE;
|
| break;
|
| case sync_pb::SyncEnums_DeviceType_TYPE_TABLET:
|
| - session_header->device_type = sync_driver::SyncedSession::TYPE_TABLET;
|
| + session_header->device_type = SyncedSession::TYPE_TABLET;
|
| break;
|
| case sync_pb::SyncEnums_DeviceType_TYPE_OTHER:
|
| // Intentionally fall-through
|
| default:
|
| - session_header->device_type = sync_driver::SyncedSession::TYPE_OTHER;
|
| + session_header->device_type = SyncedSession::TYPE_OTHER;
|
| break;
|
| }
|
| }
|
| @@ -1077,7 +1075,7 @@ SessionsSyncManager::synced_window_delegates_getter() const {
|
| }
|
|
|
| void SessionsSyncManager::DoGarbageCollection() {
|
| - std::vector<const sync_driver::SyncedSession*> sessions;
|
| + std::vector<const SyncedSession*> sessions;
|
| if (!session_tracker_.LookupAllForeignSessions(&sessions,
|
| SyncedSessionTracker::RAW))
|
| return; // No foreign sessions.
|
| @@ -1107,4 +1105,4 @@ std::string SessionsSyncManager::TagHashFromSpecifics(
|
| TagFromSpecifics(specifics));
|
| }
|
|
|
| -}; // namespace browser_sync
|
| +}; // namespace sync_sessions
|
|
|