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

Unified Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 89243003: Move EmptyString, kWhitespace and the BOM to base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/chrome_render_view_observer.cc
diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc
index 848cc5561b2095f2cdc73ff3a79506f0f6db80e7..f65b5334a6be8e2726edc2c99e7699102d486e82 100644
--- a/chrome/renderer/chrome_render_view_observer.cc
+++ b/chrome/renderer/chrome_render_view_observer.cc
@@ -971,8 +971,8 @@ void ChromeRenderViewObserver::CaptureText(WebFrame* frame,
// partial word indexed at the end that might have been clipped. Therefore,
// terminate the string at the last space to ensure no words are clipped.
if (contents->size() == kMaxIndexChars) {
- size_t last_space_index = contents->find_last_of(kWhitespaceUTF16);
- if (last_space_index == std::wstring::npos)
+ size_t last_space_index = contents->find_last_of(base::kWhitespaceUTF16);
+ if (last_space_index == base::string16::npos)
return; // don't index if we got a huge block of text with no spaces
contents->resize(last_space_index);
}
« no previous file with comments | « chrome/common/extensions/permissions/socket_permission_entry.cc ('k') | chrome_frame/chrome_active_document.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698