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

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

Issue 6241001: wstring: make net::GetSuggestedFilename return utf-16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed Created 9 years, 11 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.cc » ('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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 424
425 bool CanPasteFromClipboard(const BookmarkNode* node) { 425 bool CanPasteFromClipboard(const BookmarkNode* node) {
426 if (!node) 426 if (!node)
427 return false; 427 return false;
428 return BookmarkNodeData::ClipboardContainsBookmarks(); 428 return BookmarkNodeData::ClipboardContainsBookmarks();
429 } 429 }
430 430
431 string16 GetNameForURL(const GURL& url) { 431 string16 GetNameForURL(const GURL& url) {
432 if (url.is_valid()) { 432 if (url.is_valid()) {
433 return WideToUTF16(net::GetSuggestedFilename( 433 return net::GetSuggestedFilename(url, "", "", string16());
434 url, std::string(), std::string(), FilePath()).ToWStringHack());
435 } else { 434 } else {
436 return l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); 435 return l10n_util::GetStringUTF16(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME);
437 } 436 }
438 } 437 }
439 438
440 std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups( 439 std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups(
441 BookmarkModel* model, 440 BookmarkModel* model,
442 size_t max_count) { 441 size_t max_count) {
443 std::vector<const BookmarkNode*> nodes; 442 std::vector<const BookmarkNode*> nodes;
444 ui::TreeNodeIterator<const BookmarkNode> iterator(model->root_node()); 443 ui::TreeNodeIterator<const BookmarkNode> iterator(model->root_node());
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 return true; 661 return true;
663 662
664 for (int i = 0; i < node->GetChildCount(); ++i) { 663 for (int i = 0; i < node->GetChildCount(); ++i) {
665 if (NodeHasURLs(node->GetChild(i))) 664 if (NodeHasURLs(node->GetChild(i)))
666 return true; 665 return true;
667 } 666 }
668 return false; 667 return false;
669 } 668 }
670 669
671 } // namespace bookmark_utils 670 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698