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

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

Issue 3197009: Remove wstrings in bookmarks, part 10. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.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) 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 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 Snippet::MatchPositions match_positions; 140 Snippet::MatchPositions match_positions;
141 }; 141 };
142 142
143 // Returns true if |n1| was added more recently than |n2|. 143 // Returns true if |n1| was added more recently than |n2|.
144 bool MoreRecentlyAdded(const BookmarkNode* n1, const BookmarkNode* n2); 144 bool MoreRecentlyAdded(const BookmarkNode* n1, const BookmarkNode* n2);
145 145
146 // Returns up to |max_count| bookmarks from |model| whose url or title contains 146 // Returns up to |max_count| bookmarks from |model| whose url or title contains
147 // the text |text|. |languages| is user's accept-language setting to decode 147 // the text |text|. |languages| is user's accept-language setting to decode
148 // IDN. 148 // IDN.
149 void GetBookmarksContainingText(BookmarkModel* model, 149 void GetBookmarksContainingText(BookmarkModel* model,
150 const std::wstring& text, 150 const string16& text,
151 size_t max_count, 151 size_t max_count,
152 const std::wstring& languages, 152 const std::wstring& languages,
153 std::vector<const BookmarkNode*>* nodes); 153 std::vector<const BookmarkNode*>* nodes);
154 154
155 // Returns true if |node|'s url or title contains the string |text|. 155 // Returns true if |node|'s url or title contains the string |text|.
156 // |languages| is user's accept-language setting to decode IDN. 156 // |languages| is user's accept-language setting to decode IDN.
157 bool DoesBookmarkContainText(const BookmarkNode* node, 157 bool DoesBookmarkContainText(const BookmarkNode* node,
158 const std::wstring& text, 158 const string16& text,
159 const std::wstring& languages); 159 const std::wstring& languages);
160 160
161 // Modifies a bookmark node (assuming that there's no magic that needs to be 161 // Modifies a bookmark node (assuming that there's no magic that needs to be
162 // done regarding moving from one folder to another). If a new node is 162 // done regarding moving from one folder to another). If a new node is
163 // explicitly being added, returns a pointer to the new node that was created. 163 // explicitly being added, returns a pointer to the new node that was created.
164 // Otherwise the return value is identically |node|. 164 // Otherwise the return value is identically |node|.
165 const BookmarkNode* ApplyEditsWithNoGroupChange( 165 const BookmarkNode* ApplyEditsWithNoGroupChange(
166 BookmarkModel* model, 166 BookmarkModel* model,
167 const BookmarkNode* parent, 167 const BookmarkNode* parent,
168 const BookmarkEditor::EditDetails& details, 168 const BookmarkEditor::EditDetails& details,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Number of bookmarks we'll open before prompting the user to see if they 209 // Number of bookmarks we'll open before prompting the user to see if they
210 // really want to open all. 210 // really want to open all.
211 // 211 //
212 // NOTE: treat this as a const. It is not const as various tests change the 212 // NOTE: treat this as a const. It is not const as various tests change the
213 // value. 213 // value.
214 extern int num_urls_before_prompting; 214 extern int num_urls_before_prompting;
215 215
216 } // namespace bookmark_utils 216 } // namespace bookmark_utils
217 217
218 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_ 218 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/bookmarks/bookmark_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698