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

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

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/syncable/directory_manager.h ('k') | chrome/browser/sync/syncable/syncable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/syncable/directory_manager.cc
diff --git a/chrome/browser/sync/syncable/directory_manager.cc b/chrome/browser/sync/syncable/directory_manager.cc
index 73d9f8a6009a7b62e548e3d9da9d053ef1f12fd5..7f91d5acefa2bce4692a8ca6f86075d0698a0e1a 100644
--- a/chrome/browser/sync/syncable/directory_manager.cc
+++ b/chrome/browser/sync/syncable/directory_manager.cc
@@ -51,16 +51,18 @@ DirectoryManager::~DirectoryManager() {
delete channel_;
}
-bool DirectoryManager::Open(const std::string& name) {
+bool DirectoryManager::Open(const std::string& name,
+ DirectoryChangeDelegate* delegate) {
bool was_open = false;
- const DirOpenResult result = OpenImpl(name,
- GetSyncDataDatabasePath(), &was_open);
+ const DirOpenResult result =
+ OpenImpl(name, GetSyncDataDatabasePath(), delegate, &was_open);
return syncable::OPENED == result;
}
// Opens a directory. Returns false on error.
DirOpenResult DirectoryManager::OpenImpl(const std::string& name,
const FilePath& path,
+ DirectoryChangeDelegate* delegate,
bool* was_open) {
bool opened = false;
{
@@ -79,7 +81,7 @@ DirOpenResult DirectoryManager::OpenImpl(const std::string& name,
// Otherwise, open it.
scoped_ptr<Directory> dir(new Directory);
- const DirOpenResult result = dir->Open(path, name);
+ const DirOpenResult result = dir->Open(path, name, delegate);
if (syncable::OPENED == result) {
base::AutoLock lock(lock_);
managed_directory_ = dir.release();
« no previous file with comments | « chrome/browser/sync/syncable/directory_manager.h ('k') | chrome/browser/sync/syncable/syncable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698