diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 21:54:32 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-28 21:54:32 +0000 |
commit | f7011fcb7f28651953b1765b241c974e25c8cd40 (patch) | |
tree | f3a2c97bb98cc12aaca39bb27791998f026b58b7 /chrome/browser/bookmarks | |
parent | 4663213354a9c41ab0e5a785d52bf5c9a9692514 (diff) | |
download | chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.zip chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.tar.gz chromium_src-f7011fcb7f28651953b1765b241c974e25c8cd40.tar.bz2 |
Porting profiles to the Mac.
Review URL: http://codereview.chromium.org/19623
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r-- | chrome/browser/bookmarks/bookmark_drag_data.cc | 6 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_model_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/bookmarks/bookmark_storage.cc | 4 |
3 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/bookmarks/bookmark_drag_data.cc b/chrome/browser/bookmarks/bookmark_drag_data.cc index 2e7285a..73ac107 100644 --- a/chrome/browser/bookmarks/bookmark_drag_data.cc +++ b/chrome/browser/bookmarks/bookmark_drag_data.cc @@ -92,7 +92,8 @@ void BookmarkDragData::Write(Profile* profile, OSExchangeData* data) const { } Pickle data_pickle; - data_pickle.WriteWString(profile ? profile->GetPath() : std::wstring()); + data_pickle.WriteWString( + profile ? profile->GetPath().ToWStringHack() : std::wstring()); data_pickle.WriteSize(elements.size()); for (size_t i = 0; i < elements.size(); ++i) @@ -163,5 +164,6 @@ BookmarkNode* BookmarkDragData::GetFirstNode(Profile* profile) const { bool BookmarkDragData::IsFromProfile(Profile* profile) const { // An empty path means the data is not associated with any profile. - return (!profile_path_.empty() && profile->GetPath() == profile_path_); + return (!profile_path_.empty() && + profile->GetPath().ToWStringHack() == profile_path_); } diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc index a78dec6..1ef384c 100644 --- a/chrome/browser/bookmarks/bookmark_model_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc @@ -773,7 +773,7 @@ TEST_F(BookmarkModelTestWithProfile2, MigrateFromDBToFileTest) { PathService::Get(chrome::DIR_TEST_DATA, &old_history_path); file_util::AppendToPath(&old_history_path, L"bookmarks"); file_util::AppendToPath(&old_history_path, L"History_with_starred"); - std::wstring new_history_path = profile_->GetPath(); + std::wstring new_history_path = profile_->GetPath().ToWStringHack(); file_util::Delete(new_history_path, true); file_util::CreateDirectory(new_history_path); file_util::AppendToPath(&new_history_path, chrome::kHistoryFilename); diff --git a/chrome/browser/bookmarks/bookmark_storage.cc b/chrome/browser/bookmarks/bookmark_storage.cc index 23f47b4..a159e62 100644 --- a/chrome/browser/bookmarks/bookmark_storage.cc +++ b/chrome/browser/bookmarks/bookmark_storage.cc @@ -34,9 +34,9 @@ BookmarkStorage::BookmarkStorage(Profile* profile, BookmarkModel* model) : model_(model), ALLOW_THIS_IN_INITIALIZER_LIST(save_factory_(this)), backend_thread_(g_browser_process->file_thread()) { - std::wstring path = profile->GetPath(); + std::wstring path = profile->GetPath().ToWStringHack(); file_util::AppendToPath(&path, chrome::kBookmarksFileName); - std::wstring tmp_history_path = profile->GetPath(); + std::wstring tmp_history_path = profile->GetPath().ToWStringHack(); file_util::AppendToPath(&tmp_history_path, chrome::kHistoryBookmarksFileName); backend_ = new BookmarkStorageBackend(path, tmp_history_path); } |