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_utils.h" | 5 #include "chrome/browser/bookmarks/bookmark_utils.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 } | 432 } |
433 | 433 |
434 bool CanPasteFromClipboard(const BookmarkNode* node) { | 434 bool CanPasteFromClipboard(const BookmarkNode* node) { |
435 if (!node) | 435 if (!node) |
436 return false; | 436 return false; |
437 return BookmarkNodeData::ClipboardContainsBookmarks(); | 437 return BookmarkNodeData::ClipboardContainsBookmarks(); |
438 } | 438 } |
439 | 439 |
440 string16 GetNameForURL(const GURL& url) { | 440 string16 GetNameForURL(const GURL& url) { |
441 if (url.is_valid()) { | 441 if (url.is_valid()) { |
442 return net::GetSuggestedFilename(url, "", "", string16()); | 442 return net::GetSuggestedFilename(url, "", "", "", string16()); |
443 } else { | 443 } else { |
444 return l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); | 444 return l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); |
445 } | 445 } |
446 } | 446 } |
447 | 447 |
448 std::vector<const BookmarkNode*> GetMostRecentlyModifiedFolders( | 448 std::vector<const BookmarkNode*> GetMostRecentlyModifiedFolders( |
449 BookmarkModel* model, | 449 BookmarkModel* model, |
450 size_t max_count) { | 450 size_t max_count) { |
451 std::vector<const BookmarkNode*> nodes; | 451 std::vector<const BookmarkNode*> nodes; |
452 ui::TreeNodeIterator<const BookmarkNode> iterator(model->root_node()); | 452 ui::TreeNodeIterator<const BookmarkNode> iterator(model->root_node()); |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 return true; | 681 return true; |
682 | 682 |
683 for (int i = 0; i < node->child_count(); ++i) { | 683 for (int i = 0; i < node->child_count(); ++i) { |
684 if (NodeHasURLs(node->GetChild(i))) | 684 if (NodeHasURLs(node->GetChild(i))) |
685 return true; | 685 return true; |
686 } | 686 } |
687 return false; | 687 return false; |
688 } | 688 } |
689 | 689 |
690 } // namespace bookmark_utils | 690 } // namespace bookmark_utils |
OLD | NEW |