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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host.h

Issue 7614001: [Sync] Add comment for SyncBackendHost::OnBackendInitialized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // SyncFrontend is the interface used by SyncBackendHost to communicate with 52 // SyncFrontend is the interface used by SyncBackendHost to communicate with
53 // the entity that created it and, presumably, is interested in sync-related 53 // the entity that created it and, presumably, is interested in sync-related
54 // activity. 54 // activity.
55 // NOTE: All methods will be invoked by a SyncBackendHost on the same thread 55 // NOTE: All methods will be invoked by a SyncBackendHost on the same thread
56 // used to create that SyncBackendHost. 56 // used to create that SyncBackendHost.
57 class SyncFrontend { 57 class SyncFrontend {
58 public: 58 public:
59 SyncFrontend() {} 59 SyncFrontend() {}
60 60
61 // The backend has completed initialization and it is now ready to accept and 61 // The backend has completed initialization and it is now ready to
62 // process changes. If success is false, initialization wasn't able to be 62 // accept and process changes. If success is false, initialization
63 // completed and should be retried. 63 // wasn't able to be completed and should be retried.
64 //
65 // |js_backend| is what about:sync interacts with; it's different
66 // from the 'Backend' in 'OnBackendInitialized' (unfortunately).
tim (not reviewing) 2011/08/11 21:43:19 is |js_backend| only provided on |success| = true?
akalin 2011/08/12 18:24:26 It's initialized only on success = true. Added co
64 virtual void OnBackendInitialized( 67 virtual void OnBackendInitialized(
65 const WeakHandle<JsBackend>& js_backend, bool success) = 0; 68 const WeakHandle<JsBackend>& js_backend, bool success) = 0;
66 69
67 // The backend queried the server recently and received some updates. 70 // The backend queried the server recently and received some updates.
68 virtual void OnSyncCycleCompleted() = 0; 71 virtual void OnSyncCycleCompleted() = 0;
69 72
70 // The backend encountered an authentication problem and requests new 73 // The backend encountered an authentication problem and requests new
71 // credentials to be provided. See SyncBackendHost::Authenticate for details. 74 // credentials to be provided. See SyncBackendHost::Authenticate for details.
72 virtual void OnAuthError() = 0; 75 virtual void OnAuthError() = 0;
73 76
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 609
607 // UI-thread cache of the last SyncSessionSnapshot received from syncapi. 610 // UI-thread cache of the last SyncSessionSnapshot received from syncapi.
608 scoped_ptr<sessions::SyncSessionSnapshot> last_snapshot_; 611 scoped_ptr<sessions::SyncSessionSnapshot> last_snapshot_;
609 612
610 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); 613 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost);
611 }; 614 };
612 615
613 } // namespace browser_sync 616 } // namespace browser_sync
614 617
615 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ 618 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_
OLDNEW
« chrome/browser/sync/engine/syncapi.h ('K') | « chrome/browser/sync/engine/syncapi.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698