| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/bookmarks/bookmark_node_data.h" | 5 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/pickle.h" | 10 #include "base/pickle.h" |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 | 186 |
| 187 elements.clear(); | 187 elements.clear(); |
| 188 elements.push_back(element); | 188 elements.push_back(element); |
| 189 return true; | 189 return true; |
| 190 } | 190 } |
| 191 | 191 |
| 192 return false; | 192 return false; |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool BookmarkNodeData::ClipboardContainsBookmarks() { | 195 bool BookmarkNodeData::ClipboardContainsBookmarks() { |
| 196 #if defined(TOUCH_UI) | |
| 197 // Temporarily disabling clipboard due to bug 96448. | |
| 198 // TODO(wyck): Reenable when cause of message loop hang in | |
| 199 // gtk_clipboard_wait_for_contents is determined and fixed. | |
| 200 return false; | |
| 201 #else | |
| 202 return g_browser_process->clipboard()->IsFormatAvailableByString( | 196 return g_browser_process->clipboard()->IsFormatAvailableByString( |
| 203 BookmarkNodeData::kClipboardFormatString, ui::Clipboard::BUFFER_STANDARD); | 197 BookmarkNodeData::kClipboardFormatString, ui::Clipboard::BUFFER_STANDARD); |
| 204 #endif | |
| 205 } | 198 } |
| 206 #else | 199 #else |
| 207 void BookmarkNodeData::WriteToClipboard(Profile* profile) const { | 200 void BookmarkNodeData::WriteToClipboard(Profile* profile) const { |
| 208 bookmark_pasteboard_helper_mac::WriteToPasteboard( | 201 bookmark_pasteboard_helper_mac::WriteToPasteboard( |
| 209 bookmark_pasteboard_helper_mac::kCopyPastePasteboard, | 202 bookmark_pasteboard_helper_mac::kCopyPastePasteboard, |
| 210 elements, | 203 elements, |
| 211 profile_path_.value()); | 204 profile_path_.value()); |
| 212 } | 205 } |
| 213 | 206 |
| 214 bool BookmarkNodeData::ReadFromClipboard() { | 207 bool BookmarkNodeData::ReadFromClipboard() { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 DCHECK(profile_path_.empty()); | 340 DCHECK(profile_path_.empty()); |
| 348 | 341 |
| 349 if (profile) | 342 if (profile) |
| 350 profile_path_ = profile->GetPath(); | 343 profile_path_ = profile->GetPath(); |
| 351 } | 344 } |
| 352 | 345 |
| 353 bool BookmarkNodeData::IsFromProfile(Profile* profile) const { | 346 bool BookmarkNodeData::IsFromProfile(Profile* profile) const { |
| 354 // An empty path means the data is not associated with any profile. | 347 // An empty path means the data is not associated with any profile. |
| 355 return !profile_path_.empty() && profile_path_ == profile->GetPath(); | 348 return !profile_path_.empty() && profile_path_ == profile->GetPath(); |
| 356 } | 349 } |
| OLD | NEW |