Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: sync/internal_api/public/sync_manager.h

Issue 437683002: Wire sync shutdown reason from PSS all the way down to sync manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 5 #ifndef SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 6 #define SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/callback_forward.h" 12 #include "base/callback_forward.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/scoped_vector.h" 16 #include "base/memory/scoped_vector.h"
17 #include "base/task_runner.h" 17 #include "base/task_runner.h"
18 #include "base/threading/thread_checker.h" 18 #include "base/threading/thread_checker.h"
19 #include "google_apis/gaia/oauth2_token_service.h" 19 #include "google_apis/gaia/oauth2_token_service.h"
20 #include "sync/base/sync_export.h" 20 #include "sync/base/sync_export.h"
21 #include "sync/internal_api/public/base/invalidation_interface.h" 21 #include "sync/internal_api/public/base/invalidation_interface.h"
22 #include "sync/internal_api/public/base/model_type.h" 22 #include "sync/internal_api/public/base/model_type.h"
23 #include "sync/internal_api/public/change_record.h" 23 #include "sync/internal_api/public/change_record.h"
24 #include "sync/internal_api/public/configure_reason.h" 24 #include "sync/internal_api/public/configure_reason.h"
25 #include "sync/internal_api/public/engine/model_safe_worker.h" 25 #include "sync/internal_api/public/engine/model_safe_worker.h"
26 #include "sync/internal_api/public/engine/sync_status.h" 26 #include "sync/internal_api/public/engine/sync_status.h"
27 #include "sync/internal_api/public/events/protocol_event.h" 27 #include "sync/internal_api/public/events/protocol_event.h"
28 #include "sync/internal_api/public/shutdown_reason.h"
28 #include "sync/internal_api/public/sync_context_proxy.h" 29 #include "sync/internal_api/public/sync_context_proxy.h"
29 #include "sync/internal_api/public/sync_encryption_handler.h" 30 #include "sync/internal_api/public/sync_encryption_handler.h"
30 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h" 31 #include "sync/internal_api/public/util/report_unrecoverable_error_function.h"
31 #include "sync/internal_api/public/util/unrecoverable_error_handler.h" 32 #include "sync/internal_api/public/util/unrecoverable_error_handler.h"
32 #include "sync/internal_api/public/util/weak_handle.h" 33 #include "sync/internal_api/public/util/weak_handle.h"
33 #include "sync/protocol/sync_protocol_error.h" 34 #include "sync/protocol/sync_protocol_error.h"
34 35
35 namespace sync_pb { 36 namespace sync_pb {
36 class EncryptedData; 37 class EncryptedData;
37 } // namespace sync_pb 38 } // namespace sync_pb
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 virtual void RemoveObserver(Observer* observer) = 0; 330 virtual void RemoveObserver(Observer* observer) = 0;
330 331
331 // Status-related getter. May be called on any thread. 332 // Status-related getter. May be called on any thread.
332 virtual SyncStatus GetDetailedStatus() const = 0; 333 virtual SyncStatus GetDetailedStatus() const = 0;
333 334
334 // Call periodically from a database-safe thread to persist recent changes 335 // Call periodically from a database-safe thread to persist recent changes
335 // to the syncapi model. 336 // to the syncapi model.
336 virtual void SaveChanges() = 0; 337 virtual void SaveChanges() = 0;
337 338
338 // Issue a final SaveChanges, and close sqlite handles. 339 // Issue a final SaveChanges, and close sqlite handles.
339 virtual void ShutdownOnSyncThread() = 0; 340 virtual void ShutdownOnSyncThread(ShutdownReason reason) = 0;
340 341
341 // May be called from any thread. 342 // May be called from any thread.
342 virtual UserShare* GetUserShare() = 0; 343 virtual UserShare* GetUserShare() = 0;
343 344
344 // Returns an instance of the main interface for non-blocking sync types. 345 // Returns an instance of the main interface for non-blocking sync types.
345 virtual syncer::SyncContextProxy* GetSyncContextProxy() = 0; 346 virtual syncer::SyncContextProxy* GetSyncContextProxy() = 0;
346 347
347 // Returns the cache_guid of the currently open database. 348 // Returns the cache_guid of the currently open database.
348 // Requires that the SyncManager be initialized. 349 // Requires that the SyncManager be initialized.
349 virtual const std::string cache_guid() = 0; 350 virtual const std::string cache_guid() = 0;
(...skipping 28 matching lines...) Expand all
378 syncer::TypeDebugInfoObserver* observer) = 0; 379 syncer::TypeDebugInfoObserver* observer) = 0;
379 380
380 // Request that all current counter values be emitted as though they had just 381 // Request that all current counter values be emitted as though they had just
381 // been updated. Useful for initializing new observers' state. 382 // been updated. Useful for initializing new observers' state.
382 virtual void RequestEmitDebugInfo() = 0; 383 virtual void RequestEmitDebugInfo() = 0;
383 }; 384 };
384 385
385 } // namespace syncer 386 } // namespace syncer
386 387
387 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_ 388 #endif // SYNC_INTERNAL_API_PUBLIC_SYNC_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/internal_api/public/shutdown_reason.h ('k') | sync/internal_api/public/test/fake_sync_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698