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

Side by Side Diff: components/sync/engine_impl/all_status.h

Issue 2619763002: Expose local sync mode status in the chrome://sync-internals page. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « components/sync/engine/sync_status.h ('k') | components/sync/engine_impl/all_status.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_ENGINE_IMPL_ALL_STATUS_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_ALL_STATUS_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_ALL_STATUS_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_ALL_STATUS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void SetCryptoHasPendingKeys(bool has_pending_keys); 59 void SetCryptoHasPendingKeys(bool has_pending_keys);
60 void SetPassphraseType(PassphraseType type); 60 void SetPassphraseType(PassphraseType type);
61 void SetHasKeystoreKey(bool has_keystore_key); 61 void SetHasKeystoreKey(bool has_keystore_key);
62 void SetKeystoreMigrationTime(const base::Time& migration_time); 62 void SetKeystoreMigrationTime(const base::Time& migration_time);
63 63
64 void SetSyncId(const std::string& sync_id); 64 void SetSyncId(const std::string& sync_id);
65 void SetInvalidatorClientId(const std::string& invalidator_client_id); 65 void SetInvalidatorClientId(const std::string& invalidator_client_id);
66 66
67 void IncrementNudgeCounter(NudgeSource source); 67 void IncrementNudgeCounter(NudgeSource source);
68 68
69 void SetLocalBackendFolder(const std::string& folder);
70
69 protected: 71 protected:
70 // Examines syncer to calculate syncing and the unsynced count, 72 // Examines syncer to calculate syncing and the unsynced count,
71 // and returns a Status with new values. 73 // and returns a Status with new values.
72 SyncStatus CalcSyncing(const SyncCycleEvent& event) const; 74 SyncStatus CalcSyncing(const SyncCycleEvent& event) const;
73 SyncStatus CreateBlankStatus() const; 75 SyncStatus CreateBlankStatus() const;
74 76
75 SyncStatus status_; 77 SyncStatus status_;
76 78
77 mutable base::Lock mutex_; // Protects all data members. 79 mutable base::Lock mutex_; // Protects all data members.
78 80
79 private: 81 private:
80 friend class ScopedStatusLock; 82 friend class ScopedStatusLock;
81 83
82 DISALLOW_COPY_AND_ASSIGN(AllStatus); 84 DISALLOW_COPY_AND_ASSIGN(AllStatus);
83 }; 85 };
84 86
85 class ScopedStatusLock { 87 class ScopedStatusLock {
86 public: 88 public:
87 explicit ScopedStatusLock(AllStatus* allstatus); 89 explicit ScopedStatusLock(AllStatus* allstatus);
88 ~ScopedStatusLock(); 90 ~ScopedStatusLock();
89 91
90 protected: 92 protected:
91 AllStatus* allstatus_; 93 AllStatus* allstatus_;
92 }; 94 };
93 95
94 } // namespace syncer 96 } // namespace syncer
95 97
96 #endif // COMPONENTS_SYNC_ENGINE_IMPL_ALL_STATUS_H_ 98 #endif // COMPONENTS_SYNC_ENGINE_IMPL_ALL_STATUS_H_
OLDNEW
« no previous file with comments | « components/sync/engine/sync_status.h ('k') | components/sync/engine_impl/all_status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698