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

Side by Side Diff: chrome/browser/sync/js_transaction_observer.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_TRANSACTION_OBSERVER_H_
6 #define CHROME_BROWSER_SYNC_JS_TRANSACTION_OBSERVER_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "base/threading/non_thread_safe.h"
14 #include "chrome/browser/sync/syncable/transaction_observer.h"
15
16 namespace browser_sync {
17
18 class JsEventRouter;
19
20 // Routes SyncManager events to a JsEventRouter.
21 class JsTransactionObserver : public syncable::TransactionObserver {
22 public:
23 // |parent_router| must be non-NULL and must outlive this object.
24 explicit JsTransactionObserver(JsEventRouter* parent_router);
25
26 virtual ~JsTransactionObserver();
27
28 // syncable::TransactionObserver implementation.
29 virtual void OnTransactionStart(
30 const tracked_objects::Location& location,
31 const syncable::WriterTag& writer) OVERRIDE;
32 virtual void OnTransactionMutate(
33 const tracked_objects::Location& location,
34 const syncable::WriterTag& writer,
35 const syncable::OriginalEntries& originals,
36 const syncable::ModelTypeBitSet& models_with_changes) OVERRIDE;
37 virtual void OnTransactionEnd(
38 const tracked_objects::Location& location,
39 const syncable::WriterTag& writer) OVERRIDE;
40
41 private:
42 base::NonThreadSafe non_thread_safe_;
43 JsEventRouter* parent_router_;
44
45 DISALLOW_COPY_AND_ASSIGN(JsTransactionObserver);
46 };
47
48 } // namespace browser_sync
49
50 #endif // CHROME_BROWSER_SYNC_JS_TRANSACTION_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/js_directory_change_listener.cc ('k') | chrome/browser/sync/js_transaction_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698