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

Side by Side Diff: chrome/browser/sync/engine/syncapi.h

Issue 7550023: [Sync] Add passphrase/encryption info to chrome://sync. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file defines the "sync API", an interface to the syncer 5 // This file defines the "sync API", an interface to the syncer
6 // backend that exposes (1) the core functionality of maintaining a consistent 6 // backend that exposes (1) the core functionality of maintaining a consistent
7 // local snapshot of a hierarchical object set; (2) a means to transactionally 7 // local snapshot of a hierarchical object set; (2) a means to transactionally
8 // access and modify those objects; (3) a means to control client/server 8 // access and modify those objects; (3) a means to control client/server
9 // synchronization tasks, namely: pushing local object modifications to a 9 // synchronization tasks, namely: pushing local object modifications to a
10 // server, pulling nonlocal object modifications from a server to this client, 10 // server, pulling nonlocal object modifications from a server to this client,
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 READY, 695 READY,
696 // Internal sync error. 696 // Internal sync error.
697 CONFLICT, 697 CONFLICT,
698 // Can't connect to server, and we haven't completed the initial 698 // Can't connect to server, and we haven't completed the initial
699 // sync yet. So there's nothing we can do but wait for the server. 699 // sync yet. So there's nothing we can do but wait for the server.
700 OFFLINE_UNUSABLE, 700 OFFLINE_UNUSABLE,
701 701
702 SUMMARY_STATUS_COUNT, 702 SUMMARY_STATUS_COUNT,
703 }; 703 };
704 704
705 Status();
706 ~Status();
707
705 Summary summary; 708 Summary summary;
706 bool authenticated; // Successfully authenticated via GAIA. 709 bool authenticated; // Successfully authenticated via GAIA.
707 bool server_up; // True if we have received at least one good 710 bool server_up; // True if we have received at least one good
708 // reply from the server. 711 // reply from the server.
709 bool server_reachable; // True if we received any reply from the server. 712 bool server_reachable; // True if we received any reply from the server.
710 bool server_broken; // True of the syncer is stopped because of server 713 bool server_broken; // True of the syncer is stopped because of server
711 // issues. 714 // issues.
712 bool notifications_enabled; // True only if subscribed for notifications. 715 bool notifications_enabled; // True only if subscribed for notifications.
713 716
714 // Notifications counters updated by the actions in synapi. 717 // Notifications counters updated by the actions in synapi.
(...skipping 25 matching lines...) Expand all
740 int num_local_overwrites_total; 743 int num_local_overwrites_total;
741 int num_server_overwrites_total; 744 int num_server_overwrites_total;
742 745
743 // Count of empty and non empty getupdates; 746 // Count of empty and non empty getupdates;
744 int nonempty_get_updates; 747 int nonempty_get_updates;
745 int empty_get_updates; 748 int empty_get_updates;
746 749
747 // Count of useless and useful syncs we perform. 750 // Count of useless and useful syncs we perform.
748 int useless_sync_cycles; 751 int useless_sync_cycles;
749 int useful_sync_cycles; 752 int useful_sync_cycles;
753
754 // Encryption related.
755 std::string encrypted_types;
akalin 2011/08/04 01:14:48 I'd prefer storing it here as a ModelTypeSet/BitSe
Nicolas Zea 2011/08/04 01:27:52 Done.
756 bool cryptographer_ready;
757 bool crypto_has_pending_keys;
750 }; 758 };
751 759
752 // An interface the embedding application implements to receive notifications 760 // An interface the embedding application implements to receive notifications
753 // from the SyncManager. Register an observer via SyncManager::AddObserver. 761 // from the SyncManager. Register an observer via SyncManager::AddObserver.
754 // This observer is an event driven model as the events may be raised from 762 // This observer is an event driven model as the events may be raised from
755 // different internal threads, and simply providing an "OnStatusChanged" type 763 // different internal threads, and simply providing an "OnStatusChanged" type
756 // notification complicates things such as trying to determine "what changed", 764 // notification complicates things such as trying to determine "what changed",
757 // if different members of the Status object are modified from different 765 // if different members of the Status object are modified from different
758 // threads. This way, the event is explicit, and it is safe for the Observer 766 // threads. This way, the event is explicit, and it is safe for the Observer
759 // to dispatch to a native thread or synchronize accordingly. 767 // to dispatch to a native thread or synchronize accordingly.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 private: 1085 private:
1078 // An opaque pointer to the nested private class. 1086 // An opaque pointer to the nested private class.
1079 SyncInternal* data_; 1087 SyncInternal* data_;
1080 1088
1081 DISALLOW_COPY_AND_ASSIGN(SyncManager); 1089 DISALLOW_COPY_AND_ASSIGN(SyncManager);
1082 }; 1090 };
1083 1091
1084 } // namespace sync_api 1092 } // namespace sync_api
1085 1093
1086 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_ 1094 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCAPI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698