OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ |
6 #define COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ | 6 #define COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "components/sync/core/shutdown_reason.h" | 28 #include "components/sync/core/shutdown_reason.h" |
29 #include "components/sync/core/sync_encryption_handler.h" | 29 #include "components/sync/core/sync_encryption_handler.h" |
30 #include "components/sync/engine/events/protocol_event.h" | 30 #include "components/sync/engine/events/protocol_event.h" |
31 #include "components/sync/engine/model_safe_worker.h" | 31 #include "components/sync/engine/model_safe_worker.h" |
32 #include "components/sync/engine/sync_status.h" | 32 #include "components/sync/engine/sync_status.h" |
33 #include "components/sync/protocol/sync_protocol_error.h" | 33 #include "components/sync/protocol/sync_protocol_error.h" |
34 #include "google_apis/gaia/oauth2_token_service.h" | 34 #include "google_apis/gaia/oauth2_token_service.h" |
35 | 35 |
36 class GURL; | 36 class GURL; |
37 | 37 |
| 38 namespace base { |
| 39 namespace trace_event { |
| 40 class ProcessMemoryDump; |
| 41 } |
| 42 } |
| 43 |
38 namespace sync_pb { | 44 namespace sync_pb { |
39 class EncryptedData; | 45 class EncryptedData; |
40 } // namespace sync_pb | 46 } // namespace sync_pb |
41 | 47 |
42 namespace syncer { | 48 namespace syncer { |
43 | 49 |
44 class BaseTransaction; | 50 class BaseTransaction; |
45 class CancelationSignal; | 51 class CancelationSignal; |
46 class DataTypeDebugInfoListener; | 52 class DataTypeDebugInfoListener; |
47 class Encryptor; | 53 class Encryptor; |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 virtual void AddObserver(Observer* observer) = 0; | 335 virtual void AddObserver(Observer* observer) = 0; |
330 | 336 |
331 // Remove the given observer. Make sure to call this if the | 337 // Remove the given observer. Make sure to call this if the |
332 // Observer is being destroyed so the SyncManager doesn't | 338 // Observer is being destroyed so the SyncManager doesn't |
333 // potentially dereference garbage. | 339 // potentially dereference garbage. |
334 virtual void RemoveObserver(Observer* observer) = 0; | 340 virtual void RemoveObserver(Observer* observer) = 0; |
335 | 341 |
336 // Status-related getter. May be called on any thread. | 342 // Status-related getter. May be called on any thread. |
337 virtual SyncStatus GetDetailedStatus() const = 0; | 343 virtual SyncStatus GetDetailedStatus() const = 0; |
338 | 344 |
| 345 // Adds memory usage statistics to |pmd| for chrome://tracing. |
| 346 virtual void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) = 0; |
| 347 |
339 // Call periodically from a database-safe thread to persist recent changes | 348 // Call periodically from a database-safe thread to persist recent changes |
340 // to the syncapi model. | 349 // to the syncapi model. |
341 virtual void SaveChanges() = 0; | 350 virtual void SaveChanges() = 0; |
342 | 351 |
343 // Issue a final SaveChanges, and close sqlite handles. | 352 // Issue a final SaveChanges, and close sqlite handles. |
344 virtual void ShutdownOnSyncThread(ShutdownReason reason) = 0; | 353 virtual void ShutdownOnSyncThread(ShutdownReason reason) = 0; |
345 | 354 |
346 // May be called from any thread. | 355 // May be called from any thread. |
347 virtual UserShare* GetUserShare() = 0; | 356 virtual UserShare* GetUserShare() = 0; |
348 | 357 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 | 403 |
395 // Updates Sync's tracking of whether the cookie jar has a mismatch with the | 404 // Updates Sync's tracking of whether the cookie jar has a mismatch with the |
396 // chrome account. See ClientConfigParams proto message for more info. | 405 // chrome account. See ClientConfigParams proto message for more info. |
397 // Note: this does not trigger a sync cycle. It just updates the sync context. | 406 // Note: this does not trigger a sync cycle. It just updates the sync context. |
398 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; | 407 virtual void OnCookieJarChanged(bool account_mismatch, bool empty_jar) = 0; |
399 }; | 408 }; |
400 | 409 |
401 } // namespace syncer | 410 } // namespace syncer |
402 | 411 |
403 #endif // COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ | 412 #endif // COMPONENTS_SYNC_CORE_SYNC_MANAGER_H_ |
OLD | NEW |