Commit 41082e57 authored by maniscalco's avatar maniscalco Committed by Commit bot

[Sync] Make Directory's protected methods private where possible

unrecoverable_error_set and one of the InitialSyncEndedForType overloads
are only called by Directory so they can be made private.

Remove name accessor as it's never called.

BUG=475557

Review URL: https://codereview.chromium.org/1096543002

Cr-Commit-Position: refs/heads/master@{#325529}
parent 2f469295
...@@ -302,9 +302,6 @@ class SYNC_EXPORT Directory { ...@@ -302,9 +302,6 @@ class SYNC_EXPORT Directory {
ModelTypeSet InitialSyncEndedTypes(); ModelTypeSet InitialSyncEndedTypes();
bool InitialSyncEndedForType(ModelType type); bool InitialSyncEndedForType(ModelType type);
bool InitialSyncEndedForType(BaseTransaction* trans, ModelType type);
const std::string& name() const { return kernel_->name; }
// (Account) Store birthday is opaque to the client, so we keep it in the // (Account) Store birthday is opaque to the client, so we keep it in the
// format it is in the proto buffer in case we switch to a binary birthday // format it is in the proto buffer in case we switch to a binary birthday
...@@ -327,12 +324,6 @@ class SYNC_EXPORT Directory { ...@@ -327,12 +324,6 @@ class SYNC_EXPORT Directory {
// Not thread safe, so should only be accessed while holding a transaction. // Not thread safe, so should only be accessed while holding a transaction.
Cryptographer* GetCryptographer(const BaseTransaction* trans); Cryptographer* GetCryptographer(const BaseTransaction* trans);
// Returns true if the directory had encountered an unrecoverable error.
// Note: Any function in |Directory| that can be called without holding a
// transaction need to check if the Directory already has an unrecoverable
// error on it.
bool unrecoverable_error_set(const BaseTransaction* trans) const;
// Called to immediately report an unrecoverable error (but don't // Called to immediately report an unrecoverable error (but don't
// propagate it up). // propagate it up).
void ReportUnrecoverableError() { void ReportUnrecoverableError() {
...@@ -628,10 +619,19 @@ class SYNC_EXPORT Directory { ...@@ -628,10 +619,19 @@ class SYNC_EXPORT Directory {
ModelType type, ModelType type,
std::vector<int64>* result); std::vector<int64>* result);
// Returns true if the initial sync for |type| has completed.
bool InitialSyncEndedForType(BaseTransaction* trans, ModelType type);
// Stops sending events to the delegate and the transaction // Stops sending events to the delegate and the transaction
// observer. // observer.
void Close(); void Close();
// Returns true if the directory had encountered an unrecoverable error.
// Note: Any function in |Directory| that can be called without holding a
// transaction need to check if the Directory already has an unrecoverable
// error on it.
bool unrecoverable_error_set(const BaseTransaction* trans) const;
Kernel* kernel_; Kernel* kernel_;
scoped_ptr<DirectoryBackingStore> store_; scoped_ptr<DirectoryBackingStore> store_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment