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

Unified Diff: chrome/browser/bookmarks/bookmark_node_data.cc

Issue 7087009: FilePath: remove some functions that aren't really used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpler Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/bookmarks/bookmark_node_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_node_data.cc
diff --git a/chrome/browser/bookmarks/bookmark_node_data.cc b/chrome/browser/bookmarks/bookmark_node_data.cc
index ed2d38c068640c1551cb98329e366b9dd33da5f0..b30a2ce9faefe0bb9a8ba677e28927bfe6f79059 100644
--- a/chrome/browser/bookmarks/bookmark_node_data.cc
+++ b/chrome/browser/bookmarks/bookmark_node_data.cc
@@ -198,17 +198,22 @@ bool BookmarkNodeData::ClipboardContainsBookmarks() {
}
#else
void BookmarkNodeData::WriteToClipboard(Profile* profile) const {
- bookmark_pasteboard_helper_mac::WriteToClipboard(elements, profile_path_);
+ bookmark_pasteboard_helper_mac::WriteToClipboard(elements,
+ profile_path_.value());
}
bool BookmarkNodeData::ReadFromClipboard() {
- return bookmark_pasteboard_helper_mac::ReadFromClipboard(elements,
- &profile_path_);
+ return bookmark_pasteboard_helper_mac::ReadFromClipboard(
+ elements, &profile_path_.value());
tony 2011/05/27 23:30:20 This looks like a compile error.
Mark Mentovai 2011/05/27 23:39:56 tony wrote:
}
bool BookmarkNodeData::ReadFromDragClipboard() {
- return bookmark_pasteboard_helper_mac::ReadFromDragClipboard(elements,
- &profile_path_);
+ // TODO(evan): bookmark_pasteboard_helper_mac should just use FilePaths.
+ FilePath::StringType buf;
+ if (!bookmark_pasteboard_helper_mac::ReadFromDragClipboard(elements, &buf))
+ return false;
+ profile_path_ = FilePath(buf);
+ return true;
}
bool BookmarkNodeData::ClipboardContainsBookmarks() {
@@ -262,7 +267,7 @@ bool BookmarkNodeData::Read(const ui::OSExchangeData& data) {
void BookmarkNodeData::WriteToPickle(Profile* profile, Pickle* pickle) const {
FilePath path = profile ? profile->GetPath() : FilePath();
- FilePath::WriteStringTypeToPickle(pickle, path.value());
+ path.WriteToPickle(pickle);
pickle->WriteSize(elements.size());
for (size_t i = 0; i < elements.size(); ++i)
@@ -272,8 +277,7 @@ void BookmarkNodeData::WriteToPickle(Profile* profile, Pickle* pickle) const {
bool BookmarkNodeData::ReadFromPickle(Pickle* pickle) {
void* data_iterator = NULL;
size_t element_count;
- if (FilePath::ReadStringTypeFromPickle(pickle, &data_iterator,
- &profile_path_) &&
+ if (profile_path_.ReadFromPickle(pickle, &data_iterator) &&
pickle->ReadSize(&data_iterator, &element_count)) {
std::vector<Element> tmp_elements;
tmp_elements.resize(element_count);
@@ -321,10 +325,10 @@ void BookmarkNodeData::SetOriginatingProfile(Profile* profile) {
DCHECK(profile_path_.empty());
if (profile)
- profile_path_ = profile->GetPath().value();
+ profile_path_ = profile->GetPath();
}
bool BookmarkNodeData::IsFromProfile(Profile* profile) const {
// An empty path means the data is not associated with any profile.
- return !profile_path_.empty() && profile_path_ == profile->GetPath().value();
+ return !profile_path_.empty() && profile_path_ == profile->GetPath();
}
« no previous file with comments | « chrome/browser/bookmarks/bookmark_node_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698