OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 virtual void RemoveObserver( | 269 virtual void RemoveObserver( |
270 ProfileSyncServiceBase::Observer* observer) OVERRIDE; | 270 ProfileSyncServiceBase::Observer* observer) OVERRIDE; |
271 virtual bool HasObserver( | 271 virtual bool HasObserver( |
272 ProfileSyncServiceBase::Observer* observer) const OVERRIDE; | 272 ProfileSyncServiceBase::Observer* observer) const OVERRIDE; |
273 | 273 |
274 | 274 |
275 void AddProtocolEventObserver(browser_sync::ProtocolEventObserver* observer); | 275 void AddProtocolEventObserver(browser_sync::ProtocolEventObserver* observer); |
276 void RemoveProtocolEventObserver( | 276 void RemoveProtocolEventObserver( |
277 browser_sync::ProtocolEventObserver* observer); | 277 browser_sync::ProtocolEventObserver* observer); |
278 | 278 |
279 // Asynchronously fetches base::Value representations of all sync nodes and | |
280 // returns to this the specified callback on this thread. | |
Nicolas Zea
2014/04/04 23:01:27
"and returns to this the specified" -> "and return
rlarocque
2014/04/05 00:07:27
Done.
| |
281 // | |
282 // These requests can live a long time and return when you least expect it. | |
283 // For safety, the callback should contain some sort of WeakPtr<> or | |
Nicolas Zea
2014/04/04 23:01:27
"should contain" -> "should be bound to"
rlarocque
2014/04/05 00:07:27
Done.
| |
284 // scoped_refptr<>. | |
285 void GetAllNodes(base::Callback<void(scoped_ptr<base::ListValue>)>); | |
286 | |
279 void RegisterAuthNotifications(); | 287 void RegisterAuthNotifications(); |
280 void UnregisterAuthNotifications(); | 288 void UnregisterAuthNotifications(); |
281 | 289 |
282 // Returns true if sync is enabled/not suppressed and the user is logged in. | 290 // Returns true if sync is enabled/not suppressed and the user is logged in. |
283 // (being logged in does not mean that tokens are available - tokens may | 291 // (being logged in does not mean that tokens are available - tokens may |
284 // be missing because they have not loaded yet, or because they were deleted | 292 // be missing because they have not loaded yet, or because they were deleted |
285 // due to http://crbug.com/121755). | 293 // due to http://crbug.com/121755). |
286 // Virtual to enable mocking in tests. | 294 // Virtual to enable mocking in tests. |
287 // TODO(tim): Remove this? Nothing in ProfileSyncService uses it, and outside | 295 // TODO(tim): Remove this? Nothing in ProfileSyncService uses it, and outside |
288 // callers use a seemingly arbitrary / redundant / bug prone combination of | 296 // callers use a seemingly arbitrary / redundant / bug prone combination of |
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1014 browser_sync::StartupController startup_controller_; | 1022 browser_sync::StartupController startup_controller_; |
1015 | 1023 |
1016 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 1024 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
1017 }; | 1025 }; |
1018 | 1026 |
1019 bool ShouldShowActionOnUI( | 1027 bool ShouldShowActionOnUI( |
1020 const syncer::SyncProtocolError& error); | 1028 const syncer::SyncProtocolError& error); |
1021 | 1029 |
1022 | 1030 |
1023 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 1031 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |