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

Side by Side Diff: chrome/browser/sync/syncable/directory_manager.cc

Issue 211019: Fix compiling of sync on linux. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include "chrome/browser/sync/syncable/directory_manager.h" 5 #include "chrome/browser/sync/syncable/directory_manager.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <iterator> 9 #include <iterator>
10 10
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 const PathString DirectoryManager::GetSyncDataDatabasePath() const { 32 const PathString DirectoryManager::GetSyncDataDatabasePath() const {
33 PathString path(root_path_); 33 PathString path(root_path_);
34 path.append(kSyncDataDatabaseFilename); 34 path.append(kSyncDataDatabaseFilename);
35 return path; 35 return path;
36 } 36 }
37 37
38 DirectoryManager::DirectoryManager(const PathString& path) 38 DirectoryManager::DirectoryManager(const PathString& path)
39 : root_path_(AppendSlash(path)), 39 : root_path_(AppendSlash(path)),
40 channel_(new Channel(DirectoryManagerShutdownEvent())), 40 managed_directory_(NULL),
41 managed_directory_(NULL) { 41 channel_(new Channel(DirectoryManagerShutdownEvent())) {
42 CHECK(0 == pthread_mutex_init(&mutex_, NULL)); 42 CHECK(0 == pthread_mutex_init(&mutex_, NULL));
43 } 43 }
44 44
45 DirectoryManager::~DirectoryManager() { 45 DirectoryManager::~DirectoryManager() {
46 DCHECK_EQ(managed_directory_, static_cast<Directory*>(NULL)) 46 DCHECK_EQ(managed_directory_, static_cast<Directory*>(NULL))
47 << "Dir " << managed_directory_->name() << " not closed!"; 47 << "Dir " << managed_directory_->name() << " not closed!";
48 pthread_mutex_lock(&mutex_); 48 pthread_mutex_lock(&mutex_);
49 delete channel_; 49 delete channel_;
50 pthread_mutex_unlock(&mutex_); 50 pthread_mutex_unlock(&mutex_);
51 CHECK(0 == pthread_mutex_destroy(&mutex_)); 51 CHECK(0 == pthread_mutex_destroy(&mutex_));
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 return dir_; 160 return dir_;
161 } 161 }
162 162
163 ScopedDirLookup::operator Directory* () const { 163 ScopedDirLookup::operator Directory* () const {
164 CHECK(good_checked_); 164 CHECK(good_checked_);
165 DCHECK(good_); 165 DCHECK(good_);
166 return dir_; 166 return dir_;
167 } 167 }
168 168
169 } // namespace syncable 169 } // namespace syncable
OLDNEW
« no previous file with comments | « chrome/browser/sync/syncable/directory_backing_store.cc ('k') | chrome/browser/sync/syncable/syncable.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698