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

Side by Side Diff: chrome/browser/bookmarks/bookmark_utils.cc

Issue 7607013: Call GenerateSafeFilename() from GetSuggestedFilename(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 456 }
457 457
458 bool CanPasteFromClipboard(const BookmarkNode* node) { 458 bool CanPasteFromClipboard(const BookmarkNode* node) {
459 if (!node) 459 if (!node)
460 return false; 460 return false;
461 return BookmarkNodeData::ClipboardContainsBookmarks(); 461 return BookmarkNodeData::ClipboardContainsBookmarks();
462 } 462 }
463 463
464 string16 GetNameForURL(const GURL& url) { 464 string16 GetNameForURL(const GURL& url) {
465 if (url.is_valid()) { 465 if (url.is_valid()) {
466 return net::GetSuggestedFilename(url, "", "", "", string16()); 466 return net::GetSuggestedFilename(url, "", "", "", "", string16());
467 } else { 467 } else {
468 return l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); 468 return l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME);
469 } 469 }
470 } 470 }
471 471
472 std::vector<const BookmarkNode*> GetMostRecentlyModifiedFolders( 472 std::vector<const BookmarkNode*> GetMostRecentlyModifiedFolders(
473 BookmarkModel* model, 473 BookmarkModel* model,
474 size_t max_count) { 474 size_t max_count) {
475 std::vector<const BookmarkNode*> nodes; 475 std::vector<const BookmarkNode*> nodes;
476 ui::TreeNodeIterator<const BookmarkNode> iterator(model->root_node()); 476 ui::TreeNodeIterator<const BookmarkNode> iterator(model->root_node());
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 ++iter) { 746 ++iter) {
747 const BookmarkNode* node = model->GetNodeByID(*iter); 747 const BookmarkNode* node = model->GetNodeByID(*iter);
748 if (!node) 748 if (!node)
749 continue; 749 continue;
750 const BookmarkNode* parent = node->parent(); 750 const BookmarkNode* parent = node->parent();
751 model->Remove(parent, parent->GetIndexOf(node)); 751 model->Remove(parent, parent->GetIndexOf(node));
752 } 752 }
753 } 753 }
754 754
755 } // namespace bookmark_utils 755 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tab_contents/web_drag_source.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698