| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/sync/sessions/sessions_sync_manager.h" | 5 #include "chrome/browser/sync/sessions/sessions_sync_manager.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/sync/glue/local_device_info_provider.h" | |
| 10 #include "chrome/browser/sync/glue/synced_tab_delegate.h" | 9 #include "chrome/browser/sync/glue/synced_tab_delegate.h" |
| 11 #include "chrome/browser/sync/glue/synced_window_delegate.h" | 10 #include "chrome/browser/sync/glue/synced_window_delegate.h" |
| 12 #include "chrome/browser/sync/sessions/sessions_util.h" | 11 #include "chrome/browser/sync/sessions/sessions_util.h" |
| 13 #include "chrome/browser/sync/sessions/synced_window_delegates_getter.h" | 12 #include "chrome/browser/sync/sessions/synced_window_delegates_getter.h" |
| 14 #include "chrome/common/url_constants.h" | 13 #include "chrome/common/url_constants.h" |
| 14 #include "components/sync_driver/local_device_info_provider.h" |
| 15 #include "content/public/browser/favicon_status.h" | 15 #include "content/public/browser/favicon_status.h" |
| 16 #include "content/public/browser/navigation_entry.h" | 16 #include "content/public/browser/navigation_entry.h" |
| 17 #include "content/public/browser/notification_details.h" | 17 #include "content/public/browser/notification_details.h" |
| 18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
| 19 #include "content/public/browser/notification_source.h" | 19 #include "content/public/browser/notification_source.h" |
| 20 #include "content/public/common/url_constants.h" | 20 #include "content/public/common/url_constants.h" |
| 21 #include "sync/api/sync_error.h" | 21 #include "sync/api/sync_error.h" |
| 22 #include "sync/api/sync_error_factory.h" | 22 #include "sync/api/sync_error_factory.h" |
| 23 #include "sync/api/sync_merge_result.h" | 23 #include "sync/api/sync_merge_result.h" |
| 24 #include "sync/api/time.h" | 24 #include "sync/api/time.h" |
| 25 | 25 |
| 26 using content::NavigationEntry; | 26 using content::NavigationEntry; |
| 27 using sessions::SerializedNavigationEntry; | 27 using sessions::SerializedNavigationEntry; |
| 28 using sync_driver::DeviceInfo; |
| 29 using sync_driver::LocalDeviceInfoProvider; |
| 28 using syncer::SyncChange; | 30 using syncer::SyncChange; |
| 29 using syncer::SyncData; | 31 using syncer::SyncData; |
| 30 | 32 |
| 31 namespace browser_sync { | 33 namespace browser_sync { |
| 32 | 34 |
| 33 // Maximum number of favicons to sync. | 35 // Maximum number of favicons to sync. |
| 34 // TODO(zea): pull this from the server. | 36 // TODO(zea): pull this from the server. |
| 35 static const int kMaxSyncFavicons = 200; | 37 static const int kMaxSyncFavicons = 200; |
| 36 | 38 |
| 37 // The maximum number of navigations in each direction we care to sync. | 39 // The maximum number of navigations in each direction we care to sync. |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 << " with age " << session_age_in_days << ", deleting."; | 1035 << " with age " << session_age_in_days << ", deleting."; |
| 1034 DeleteForeignSessionInternal(session_tag, &changes); | 1036 DeleteForeignSessionInternal(session_tag, &changes); |
| 1035 } | 1037 } |
| 1036 } | 1038 } |
| 1037 | 1039 |
| 1038 if (!changes.empty()) | 1040 if (!changes.empty()) |
| 1039 sync_processor_->ProcessSyncChanges(FROM_HERE, changes); | 1041 sync_processor_->ProcessSyncChanges(FROM_HERE, changes); |
| 1040 } | 1042 } |
| 1041 | 1043 |
| 1042 }; // namespace browser_sync | 1044 }; // namespace browser_sync |
| OLD | NEW |