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

Unified Diff: sync/engine/all_status.h

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 5 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/engine/DEPS ('k') | sync/engine/all_status.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/all_status.h
diff --git a/sync/engine/all_status.h b/sync/engine/all_status.h
deleted file mode 100644
index 1fc0801c8204e973b7352b615263097abf12092d..0000000000000000000000000000000000000000
--- a/sync/engine/all_status.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// The AllStatus object watches various sync engine components and aggregates
-// the status of all of them into one place.
-
-#ifndef SYNC_ENGINE_ALL_STATUS_H_
-#define SYNC_ENGINE_ALL_STATUS_H_
-
-#include <map>
-#include <string>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "base/synchronization/lock.h"
-#include "sync/engine/nudge_source.h"
-#include "sync/engine/sync_engine_event_listener.h"
-#include "sync/engine/syncer_types.h"
-#include "sync/internal_api/public/base/model_type.h"
-#include "sync/internal_api/public/engine/sync_status.h"
-
-namespace syncer {
-
-class ScopedStatusLock;
-struct ServerConnectionEvent;
-struct SyncCycleEvent;
-
-// This class collects data and uses it to update its internal state. It can
-// return a snapshot of this state as a SyncerStatus object.
-//
-// Most of this data ends up on the about:sync page. But the page is only
-// 'pinged' to update itself at the end of a sync cycle. A user could refresh
-// manually, but unless their timing is excellent it's unlikely that a user will
-// see any state in mid-sync cycle. We have no plans to change this. However,
-// we will continue to collect data and update state mid-sync-cycle in case we
-// need to debug slow or stuck sync cycles.
-class AllStatus : public SyncEngineEventListener {
- public:
- AllStatus();
- ~AllStatus() override;
-
- // SyncEngineEventListener implementation.
- void OnSyncCycleEvent(const SyncCycleEvent& event) override;
- void OnActionableError(const SyncProtocolError& error) override;
- void OnRetryTimeChanged(base::Time retry_time) override;
- void OnThrottledTypesChanged(ModelTypeSet throttled_types) override;
- void OnMigrationRequested(ModelTypeSet types) override;
- void OnProtocolEvent(const ProtocolEvent& event) override;
-
- SyncStatus status() const;
-
- void SetNotificationsEnabled(bool notifications_enabled);
-
- void IncrementNotifiableCommits();
-
- void IncrementNotificationsReceived();
-
- void SetEncryptedTypes(ModelTypeSet types);
- void SetCryptographerReady(bool ready);
- void SetCryptoHasPendingKeys(bool has_pending_keys);
- void SetPassphraseType(PassphraseType type);
- void SetHasKeystoreKey(bool has_keystore_key);
- void SetKeystoreMigrationTime(const base::Time& migration_time);
-
- void SetSyncId(const std::string& sync_id);
- void SetInvalidatorClientId(const std::string& invalidator_client_id);
-
- void IncrementNudgeCounter(NudgeSource source);
-
- protected:
- // Examines syncer to calculate syncing and the unsynced count,
- // and returns a Status with new values.
- SyncStatus CalcSyncing(const SyncCycleEvent& event) const;
- SyncStatus CreateBlankStatus() const;
-
- SyncStatus status_;
-
- mutable base::Lock mutex_; // Protects all data members.
-
- private:
- friend class ScopedStatusLock;
-
- DISALLOW_COPY_AND_ASSIGN(AllStatus);
-};
-
-class ScopedStatusLock {
- public:
- explicit ScopedStatusLock(AllStatus* allstatus);
- ~ScopedStatusLock();
- protected:
- AllStatus* allstatus_;
-};
-
-} // namespace syncer
-
-#endif // SYNC_ENGINE_ALL_STATUS_H_
« no previous file with comments | « sync/engine/DEPS ('k') | sync/engine/all_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698