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

Unified Diff: chrome/browser/sync/syncable/directory_manager.h

Issue 8586014: [Sync] Replace uses of ObserverListThreadSafe with WeakHandles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/syncable/directory_manager.h
diff --git a/chrome/browser/sync/syncable/directory_manager.h b/chrome/browser/sync/syncable/directory_manager.h
index 4a7316fc81ae19412196e963a7b5b78b4d826472..243000ba84eb7b7de501b43a9add87681ff790eb 100644
--- a/chrome/browser/sync/syncable/directory_manager.h
+++ b/chrome/browser/sync/syncable/directory_manager.h
@@ -22,6 +22,7 @@
#include "chrome/browser/sync/syncable/dir_open_result.h"
#include "chrome/browser/sync/syncable/syncable.h"
#include "chrome/browser/sync/util/cryptographer.h"
+#include "chrome/browser/sync/util/weak_handle.h"
namespace sync_api { class BaseTransaction; }
namespace syncable { class BaseTransaction; }
@@ -45,8 +46,10 @@ class DirectoryManager {
// common case. Does not take ownership of |delegate|, which must
// be non-NULL. Starts sending events to |delegate| if the returned
// result is true. Note that events to |delegate| may be sent from
- // *any* thread.
- bool Open(const std::string& name, DirectoryChangeDelegate* delegate);
+ // *any* thread. |transaction_observer| must be initialized.
+ bool Open(const std::string& name, DirectoryChangeDelegate* delegate,
+ const browser_sync::WeakHandle<TransactionObserver>&
+ transaction_observer);
// Marks a directory as closed and stops sending events to the
// delegate. It might take a while until all the file handles and
@@ -74,8 +77,12 @@ class DirectoryManager {
return cryptographer_.get();
}
- DirOpenResult OpenImpl(const std::string& name, const FilePath& path,
- DirectoryChangeDelegate* delegate, bool* was_open);
+ DirOpenResult OpenImpl(
+ const std::string& name, const FilePath& path,
+ DirectoryChangeDelegate* delegate,
+ const browser_sync::WeakHandle<TransactionObserver>&
+ transaction_observer,
+ bool* was_open);
// Helpers for friend class ScopedDirLookup:
friend class ScopedDirLookup;
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_unittest.cc ('k') | chrome/browser/sync/syncable/directory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698