summaryrefslogtreecommitdiffstats
path: root/chrome/browser/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/bookmarks')
-rw-r--r--chrome/browser/bookmarks/bookmark_drag_data.cc6
-rw-r--r--chrome/browser/bookmarks/bookmark_model_unittest.cc2
-rw-r--r--chrome/browser/bookmarks/bookmark_storage.cc4
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);
}