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

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

Issue 7005011: Fix bug 79905: Drag and drop of "DownloadURL" type ignores specified filename for data URLs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/download/download_util.h » ('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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698