blob: 95ba46e85693fd33395f852982bc82f1eef15041 [file] [log] [blame]
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/bookmarks/bookmark_node_data.h"
#include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h"
// static
bool BookmarkNodeData::ClipboardContainsBookmarks() {
return PasteboardContainsBookmarks(ui::CLIPBOARD_TYPE_COPY_PASTE);
}
void BookmarkNodeData::WriteToClipboard(ui::ClipboardType type) {
WriteBookmarksToPasteboard(type, elements, profile_path_);
}
bool BookmarkNodeData::ReadFromClipboard(ui::ClipboardType type) {
base::FilePath file_path;
if (ReadBookmarksFromPasteboard(type, elements, &file_path)) {
profile_path_ = file_path;
return true;
}
return false;
}