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

Unified Diff: sync/internal_api/sync_manager.h

Issue 10454105: sync: Refactor per-datatype throttling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/public/engine/sync_status.cc ('k') | sync/internal_api/sync_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager.h
diff --git a/sync/internal_api/sync_manager.h b/sync/internal_api/sync_manager.h
index 80cda3f53c37f3b33bdbd0b20c0798a8ef3d884f..04594fd75de5f7182a3e7c4ab9838ad1a54c0b64 100644
--- a/sync/internal_api/sync_manager.h
+++ b/sync/internal_api/sync_manager.h
@@ -18,6 +18,7 @@
#include "sync/internal_api/change_record.h"
#include "sync/internal_api/configure_reason.h"
#include "sync/internal_api/public/engine/model_safe_worker.h"
+#include "sync/internal_api/public/engine/sync_status.h"
#include "sync/internal_api/public/syncable/model_type.h"
#include "sync/protocol/sync_protocol_error.h"
#include "sync/util/report_unrecoverable_error_function.h"
@@ -90,75 +91,6 @@ class SyncManager {
// internal types from clients of the interface.
class SyncInternal;
- // Status encapsulates detailed state about the internals of the SyncManager.
- struct Status {
- Status();
- ~Status();
-
- bool notifications_enabled; // True only if subscribed for notifications.
-
- // Notifications counters updated by the actions in synapi.
- int notifications_received;
-
- browser_sync::SyncProtocolError sync_protocol_error;
-
- // Number of encryption conflicts counted during most recent sync cycle.
- int encryption_conflicts;
-
- // Number of hierarchy conflicts counted during most recent sync cycle.
- int hierarchy_conflicts;
-
- // Number of simple conflicts counted during most recent sync cycle.
- int simple_conflicts;
-
- // Number of items the server refused to commit due to conflict during most
- // recent sync cycle.
- int server_conflicts;
-
- // Number of items successfully committed during most recent sync cycle.
- int committed_count;
-
- bool syncing;
- // True after a client has done a first sync.
- bool initial_sync_ended;
-
- // Total updates available. If zero, nothing left to download.
- int64 updates_available;
- // Total updates received by the syncer since browser start.
- int updates_received;
- // Total updates received that are echoes of our own changes.
- int reflected_updates_received;
- // Of updates_received, how many were tombstones.
- int tombstone_updates_received;
-
- // Total successful commits.
- int num_commits_total;
-
- // Total number of overwrites due to conflict resolver since browser start.
- int num_local_overwrites_total;
- int num_server_overwrites_total;
-
- // Count of empty and non empty getupdates;
- int nonempty_get_updates;
- int empty_get_updates;
-
- // Count of sync cycles that successfully committed items;
- int sync_cycles_with_commits;
- int sync_cycles_without_commits;
-
- // Count of useless and useful syncs we perform.
- int useless_sync_cycles;
- int useful_sync_cycles;
-
- // Encryption related.
- syncable::ModelTypeSet encrypted_types;
- bool cryptographer_ready;
- bool crypto_has_pending_keys;
-
- // The unique identifer for this client.
- std::string unique_id;
- };
-
// An interface the embedding application implements to be notified
// on change events. Note that these methods may be called on *any*
// thread.
@@ -528,7 +460,7 @@ class SyncManager {
void RemoveObserver(Observer* observer);
// Status-related getter. May be called on any thread.
- Status GetDetailedStatus() const;
+ SyncStatus GetDetailedStatus() const;
// Whether or not the Nigori node is encrypted using an explicit passphrase.
// May be called on any thread.
« no previous file with comments | « sync/internal_api/public/engine/sync_status.cc ('k') | sync/internal_api/sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698