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

Side by Side Diff: chrome/browser/sync/notifier/sync_notifier.h

Issue 6794005: Move sync notifier contruction out of syncer thread. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase Created 9 years, 8 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 // Interface to the sync notifier, which is an object that receives 5 // Interface to the sync notifier, which is an object that receives
6 // notifications when updates are available for a set of sync types. 6 // notifications when updates are available for a set of sync types.
7 // All the observers are notified when such an event happens. 7 // All the observers are notified when such an event happens.
8 //
9 // A SyncNotifier must be destroyed on the same thread it was created on,
10 // and all its methods must be called on the same thread (not necessarily
11 // the one it was created on). If the methods thread is different from the
12 // creation thread, then the methods thread must not exist when the SyncNotifier
13 // is created and destroyed.
14 //
15 // In particular, the SyncNotifier will be created on the UI thread, the syncer
16 // core thread will be created, the SyncNotifier will be used on that core
17 // thread, the syncer core thread will be destroyed, and then the SyncNotifier
18 // will be destroyed.
19 //
20 // TODO(akalin): Remove the code to deal with this situation once the syncer
21 // core thread goes away.
8 22
9 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_ 23 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_
10 #define CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_ 24 #define CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_
11 25
12 #include <string> 26 #include <string>
13 27
14 #include "chrome/browser/sync/syncable/model_type.h" 28 #include "chrome/browser/sync/syncable/model_type.h"
15 29
16 namespace sync_notifier { 30 namespace sync_notifier {
17 class SyncNotifierObserver; 31 class SyncNotifierObserver;
(...skipping 20 matching lines...) Expand all
38 // This is here only to support the old p2p notification implementation, 52 // This is here only to support the old p2p notification implementation,
39 // which is still used by sync integration tests. 53 // which is still used by sync integration tests.
40 // TODO(akalin): Remove this once we move the integration tests off p2p 54 // TODO(akalin): Remove this once we move the integration tests off p2p
41 // notifications. 55 // notifications.
42 virtual void SendNotification() = 0; 56 virtual void SendNotification() = 0;
43 }; 57 };
44 } // namespace sync_notifier 58 } // namespace sync_notifier
45 59
46 #endif // CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_ 60 #endif // CHROME_BROWSER_SYNC_NOTIFIER_SYNC_NOTIFIER_H_
47 61
OLDNEW
« no previous file with comments | « chrome/browser/sync/notifier/p2p_notifier.cc ('k') | chrome/service/cloud_print/cloud_print_proxy_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698