diff options
author | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-04 18:33:53 +0000 |
---|---|---|
committer | munjal@chromium.org <munjal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-04 18:33:53 +0000 |
commit | 055aedeb2134e49c10c3b3a3593cb8df768d737c (patch) | |
tree | 4961da84e3e38e7c6a3edb68bb96e031f8856604 /chrome/browser/sync/glue | |
parent | 46e9f9d97ec029189618f8ff2089948b950e67e7 (diff) | |
download | chromium_src-055aedeb2134e49c10c3b3a3593cb8df768d737c.zip chromium_src-055aedeb2134e49c10c3b3a3593cb8df768d737c.tar.gz chromium_src-055aedeb2134e49c10c3b3a3593cb8df768d737c.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/sync/glue')
-rw-r--r-- | chrome/browser/sync/glue/sync_backend_host.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc index b10659c..523a30f 100644 --- a/chrome/browser/sync/glue/sync_backend_host.cc +++ b/chrome/browser/sync/glue/sync_backend_host.cc @@ -3,8 +3,9 @@ // found in the LICENSE file. #include "build/build_config.h" -#include "base/file_version_info.h" +#include "base/file_path.h" #include "base/file_util.h" +#include "base/file_version_info.h" #include "base/string_util.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/sync/glue/change_processor.h" @@ -174,13 +175,8 @@ void SyncBackendHost::Core::DoInitialize( DCHECK(success); syncapi_->SetObserver(this); - string16 path_str; -#if defined (OS_WIN) - path_str = host_->sync_data_folder_path().value(); -#elif defined(OS_LINUX) || defined(OS_MACOSX) - path_str = UTF8ToUTF16(host_->sync_data_folder_path().value()); -#endif - success = syncapi_->Init(path_str.c_str(), + const FilePath& path_str = host_->sync_data_folder_path(); + success = syncapi_->Init(path_str, (service_url.host() + service_url.path()).c_str(), service_url.EffectiveIntPort(), kGaiaServiceId, |