| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // datatype, propagating such changes into and out of the sync backend | 96 // datatype, propagating such changes into and out of the sync backend |
| 97 // as necessary. | 97 // as necessary. |
| 98 // | 98 // |
| 99 // When a datatype is in the process of becoming active, it may be | 99 // When a datatype is in the process of becoming active, it may be |
| 100 // in some intermediate state. Those finer-grained intermediate states | 100 // in some intermediate state. Those finer-grained intermediate states |
| 101 // are differentiated by the DataTypeController state. | 101 // are differentiated by the DataTypeController state. |
| 102 // | 102 // |
| 103 class ProfileSyncService : public browser_sync::SyncFrontend, | 103 class ProfileSyncService : public browser_sync::SyncFrontend, |
| 104 public browser_sync::SyncPrefObserver, | 104 public browser_sync::SyncPrefObserver, |
| 105 public browser_sync::UnrecoverableErrorHandler, | 105 public browser_sync::UnrecoverableErrorHandler, |
| 106 public content::NotificationObserver { | 106 public content::NotificationObserver, |
| 107 // TODO(lipalani): crbug.com/100829. Instead of |
| 108 // doing this vend weak pointers from a factory. |
| 109 public base::SupportsWeakPtr<ProfileSyncService> { |
| 110 |
| 107 public: | 111 public: |
| 108 typedef ProfileSyncServiceObserver Observer; | 112 typedef ProfileSyncServiceObserver Observer; |
| 109 typedef browser_sync::SyncBackendHost::Status Status; | 113 typedef browser_sync::SyncBackendHost::Status Status; |
| 110 | 114 |
| 111 enum SyncEventCodes { | 115 enum SyncEventCodes { |
| 112 MIN_SYNC_EVENT_CODE = 0, | 116 MIN_SYNC_EVENT_CODE = 0, |
| 113 | 117 |
| 114 // Events starting the sync service. | 118 // Events starting the sync service. |
| 115 START_FROM_NTP = 1, // Sync was started from the ad in NTP | 119 START_FROM_NTP = 1, // Sync was started from the ad in NTP |
| 116 START_FROM_WRENCH = 2, // Sync was started from the Wrench menu. | 120 START_FROM_WRENCH = 2, // Sync was started from the Wrench menu. |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 FailedDatatypesHandler failed_datatypes_handler_; | 694 FailedDatatypesHandler failed_datatypes_handler_; |
| 691 | 695 |
| 692 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 696 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 693 }; | 697 }; |
| 694 | 698 |
| 695 bool ShouldShowActionOnUI( | 699 bool ShouldShowActionOnUI( |
| 696 const browser_sync::SyncProtocolError& error); | 700 const browser_sync::SyncProtocolError& error); |
| 697 | 701 |
| 698 | 702 |
| 699 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 703 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |