Chromium Code Reviews

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

Issue 1513023: Strips http from omnibox (and a couple of other places) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 206 matching lines...)
217 // |languages| argument is user's accept-language setting to decode IDN. 217 // |languages| argument is user's accept-language setting to decode IDN.
218 bool DoesBookmarkContainWords(const BookmarkNode* node, 218 bool DoesBookmarkContainWords(const BookmarkNode* node,
219 const std::vector<std::wstring>& words, 219 const std::vector<std::wstring>& words,
220 const std::wstring& languages) { 220 const std::wstring& languages) {
221 return 221 return
222 DoesBookmarkTextContainWords( 222 DoesBookmarkTextContainWords(
223 l10n_util::ToLower(node->GetTitle()), words) || 223 l10n_util::ToLower(node->GetTitle()), words) ||
224 DoesBookmarkTextContainWords( 224 DoesBookmarkTextContainWords(
225 l10n_util::ToLower(UTF8ToWide(node->GetURL().spec())), words) || 225 l10n_util::ToLower(UTF8ToWide(node->GetURL().spec())), words) ||
226 DoesBookmarkTextContainWords(l10n_util::ToLower(net::FormatUrl( 226 DoesBookmarkTextContainWords(l10n_util::ToLower(net::FormatUrl(
227 node->GetURL(), languages, false, true, NULL, NULL, NULL)), words); 227 node->GetURL(), languages, net::kFormatUrlOmitNothing,
228 UnescapeRule::NORMAL, NULL, NULL, NULL)), words);
228 } 229 }
229 230
230 } // namespace 231 } // namespace
231 232
232 namespace bookmark_utils { 233 namespace bookmark_utils {
233 234
234 int num_urls_before_prompting = 15; 235 int num_urls_before_prompting = 15;
235 236
236 int PreferredDropOperation(int source_operations, int operations) { 237 int PreferredDropOperation(int source_operations, int operations) {
237 int common_ops = (source_operations & operations); 238 int common_ops = (source_operations & operations);
(...skipping 455 matching lines...)
693 } 694 }
694 } else { 695 } else {
695 *index = real_parent->GetChildCount(); 696 *index = real_parent->GetChildCount();
696 } 697 }
697 } 698 }
698 699
699 return real_parent; 700 return real_parent;
700 } 701 }
701 702
702 } // namespace bookmark_utils 703 } // namespace bookmark_utils
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_table_model.cc ('k') | chrome/browser/cocoa/status_bubble_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine