OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_utils.h" | 5 #include "chrome/browser/bookmarks/bookmark_utils.h" |
6 | 6 |
7 #include "app/drag_drop_types.h" | 7 #include "app/drag_drop_types.h" |
8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
9 #include "app/tree_node_iterator.h" | 9 #include "app/tree_node_iterator.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 #else | 385 #else |
386 // Not implemented on mac yet. | 386 // Not implemented on mac yet. |
387 #endif | 387 #endif |
388 } | 388 } |
389 | 389 |
390 bool CanPasteFromClipboard(const BookmarkNode* node) { | 390 bool CanPasteFromClipboard(const BookmarkNode* node) { |
391 if (!node) | 391 if (!node) |
392 return false; | 392 return false; |
393 | 393 |
394 return g_browser_process->clipboard()->IsFormatAvailable( | 394 return g_browser_process->clipboard()->IsFormatAvailable( |
395 BookmarkDragData::kClipboardFormatString); | 395 BookmarkDragData::kClipboardFormatString, Clipboard::BUFFER_STANDARD); |
396 } | 396 } |
397 | 397 |
398 std::string GetNameForURL(const GURL& url) { | 398 std::string GetNameForURL(const GURL& url) { |
399 if (url.is_valid()) { | 399 if (url.is_valid()) { |
400 return WideToUTF8(net::GetSuggestedFilename( | 400 return WideToUTF8(net::GetSuggestedFilename( |
401 url, std::string(), std::string(), std::wstring())); | 401 url, std::string(), std::string(), std::wstring())); |
402 } else { | 402 } else { |
403 return l10n_util::GetStringUTF8(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); | 403 return l10n_util::GetStringUTF8(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); |
404 } | 404 } |
405 } | 405 } |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 | 602 |
603 // Formerly in BookmarkTableView | 603 // Formerly in BookmarkTableView |
604 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth1, -1); | 604 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth1, -1); |
605 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth1, -1); | 605 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth1, -1); |
606 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth2, -1); | 606 prefs->RegisterIntegerPref(prefs::kBookmarkTableNameWidth2, -1); |
607 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth2, -1); | 607 prefs->RegisterIntegerPref(prefs::kBookmarkTableURLWidth2, -1); |
608 prefs->RegisterIntegerPref(prefs::kBookmarkTablePathWidth, -1); | 608 prefs->RegisterIntegerPref(prefs::kBookmarkTablePathWidth, -1); |
609 } | 609 } |
610 | 610 |
611 } // namespace bookmark_utils | 611 } // namespace bookmark_utils |
OLD | NEW |