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

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

Issue 271056: Do some cleanup of file path name handling. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « base/i18n/file_util_icu_unittest.cc ('k') | chrome/browser/cocoa/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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/clipboard/clipboard.h" 7 #include "app/clipboard/clipboard.h"
8 #include "app/drag_drop_types.h" 8 #include "app/drag_drop_types.h"
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/tree_node_iterator.h" 10 #include "app/tree_node_iterator.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 return false; 396 return false;
397 #else 397 #else
398 return g_browser_process->clipboard()->IsFormatAvailableByString( 398 return g_browser_process->clipboard()->IsFormatAvailableByString(
399 BookmarkDragData::kClipboardFormatString, Clipboard::BUFFER_STANDARD); 399 BookmarkDragData::kClipboardFormatString, Clipboard::BUFFER_STANDARD);
400 #endif 400 #endif
401 } 401 }
402 402
403 std::string GetNameForURL(const GURL& url) { 403 std::string GetNameForURL(const GURL& url) {
404 if (url.is_valid()) { 404 if (url.is_valid()) {
405 return WideToUTF8(net::GetSuggestedFilename( 405 return WideToUTF8(net::GetSuggestedFilename(
406 url, std::string(), std::string(), std::wstring())); 406 url, std::string(), std::string(), "").ToWStringHack());
407 } else { 407 } else {
408 return l10n_util::GetStringUTF8(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME); 408 return l10n_util::GetStringUTF8(IDS_APP_UNTITLED_SHORTCUT_FILE_NAME);
409 } 409 }
410 } 410 }
411 411
412 std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups( 412 std::vector<const BookmarkNode*> GetMostRecentlyModifiedGroups(
413 BookmarkModel* model, 413 BookmarkModel* model,
414 size_t max_count) { 414 size_t max_count) {
415 std::vector<const BookmarkNode*> nodes; 415 std::vector<const BookmarkNode*> nodes;
416 TreeNodeIterator<const BookmarkNode> iterator(model->root_node()); 416 TreeNodeIterator<const BookmarkNode> iterator(model->root_node());
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 std::vector<std::pair<GURL, std::wstring> >* urls) { 645 std::vector<std::pair<GURL, std::wstring> >* urls) {
646 for (int i = 0; i < browser->tab_count(); ++i) { 646 for (int i = 0; i < browser->tab_count(); ++i) {
647 std::pair<GURL, std::wstring> entry; 647 std::pair<GURL, std::wstring> entry;
648 GetURLAndTitleToBookmark(browser->GetTabContentsAt(i), &(entry.first), 648 GetURLAndTitleToBookmark(browser->GetTabContentsAt(i), &(entry.first),
649 &(entry.second)); 649 &(entry.second));
650 urls->push_back(entry); 650 urls->push_back(entry);
651 } 651 }
652 } 652 }
653 653
654 } // namespace bookmark_utils 654 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « base/i18n/file_util_icu_unittest.cc ('k') | chrome/browser/cocoa/web_drag_source.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698