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

Side by Side Diff: chrome/browser/sync/js_directory_change_listener.h

Issue 7190001: [Sync] Split DirectoryChangeListener for thread-safety (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix copyright Created 9 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_SYNC_JS_DIRECTORY_CHANGE_LISTENER_H_
6 #define CHROME_BROWSER_SYNC_JS_DIRECTORY_CHANGE_LISTENER_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "chrome/browser/sync/syncable/directory_change_listener.h"
14
15 namespace browser_sync {
16
17 class JsEventRouter;
18
19 // Routes SyncManager events to a JsEventRouter.
20 class JsDirectoryChangeListener : public syncable::DirectoryChangeListener {
21 public:
22 // |parent_router| must be non-NULL and must outlive this object.
23 explicit JsDirectoryChangeListener(JsEventRouter* parent_router);
24
25 virtual ~JsDirectoryChangeListener();
26
27 // syncable::DirectoryChangeListener implementation.
28 virtual void HandleCalculateChangesChangeEventFromSyncApi(
29 const syncable::OriginalEntries& originals,
30 const syncable::WriterTag& writer,
31 syncable::BaseTransaction* trans) OVERRIDE;
32 virtual void HandleCalculateChangesChangeEventFromSyncer(
33 const syncable::OriginalEntries& originals,
34 const syncable::WriterTag& writer,
35 syncable::BaseTransaction* trans) OVERRIDE;
36 virtual syncable::ModelTypeBitSet HandleTransactionEndingChangeEvent(
37 syncable::BaseTransaction* trans) OVERRIDE;
38 virtual void HandleTransactionCompleteChangeEvent(
39 const syncable::ModelTypeBitSet& models_with_changes) OVERRIDE;
40
41 private:
42 JsEventRouter* parent_router_;
43
44 DISALLOW_COPY_AND_ASSIGN(JsDirectoryChangeListener);
45 };
46
47 } // namespace browser_sync
48
49 #endif // CHROME_BROWSER_SYNC_JS_DIRECTORY_CHANGE_LISTENER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.cc ('k') | chrome/browser/sync/js_directory_change_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698