From 055aedeb2134e49c10c3b3a3593cb8df768d737c Mon Sep 17 00:00:00 2001 From: "munjal@chromium.org" Date: Wed, 4 Nov 2009 18:33:53 +0000 Subject: Clean up the strings for sync code: - Use FilePath for real file paths. - Use std::string for PathString on Windows as well TODO in a separate CL: - Get rid of PathString typedef completely and directly use std::string everywhere. - Use wchar_t in syncapi.h/.cc and get rid of sync_char16. TEST=Existing tests are sufficient since this CL does a lot of code refactoring. BUG=26342 Review URL: http://codereview.chromium.org/340055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30970 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/sync/syncable/directory_manager.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to '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 f059257..5d9a106 100644 --- a/chrome/browser/sync/syncable/directory_manager.h +++ b/chrome/browser/sync/syncable/directory_manager.h @@ -15,8 +15,9 @@ #include #include "base/atomicops.h" -#include "base/lock.h" #include "base/basictypes.h" +#include "base/file_path.h" +#include "base/lock.h" #include "chrome/browser/sync/syncable/dir_open_result.h" #include "chrome/browser/sync/syncable/path_name_cmp.h" #include "chrome/browser/sync/syncable/syncable.h" @@ -50,11 +51,11 @@ class DirectoryManager { typedef EventChannel Channel; // root_path specifies where db is stored. - explicit DirectoryManager(const PathString& root_path); + explicit DirectoryManager(const FilePath& root_path); ~DirectoryManager(); - static const PathString GetSyncDataDatabaseFilename(); - const PathString GetSyncDataDatabasePath() const; + static const FilePath GetSyncDataDatabaseFilename(); + const FilePath GetSyncDataDatabasePath() const; // Opens a directory. Returns false on error. // Name parameter is the the user's login, @@ -75,13 +76,13 @@ class DirectoryManager { Channel* channel() const { return channel_; } protected: - DirOpenResult OpenImpl(const PathString& name, const PathString& path, + DirOpenResult OpenImpl(const PathString& name, const FilePath& path, bool* was_open); // Helpers for friend class ScopedDirLookup: friend class ScopedDirLookup; - const PathString root_path_; + const FilePath root_path_; // protects managed_directory_ Lock lock_; -- cgit v1.1