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