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

Unified Diff: net/base/escape.h

Issue 372017: Fix various problems with inline autocomplete and URLs that change length dur... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« no previous file with comments | « chrome/browser/views/url_picker.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/escape.h
===================================================================
--- net/base/escape.h (revision 31214)
+++ net/base/escape.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -93,17 +93,17 @@
UnescapeRule::Type rules);
// Unescapes the given substring as a URL, and then tries to interpret the
-// result as being encoded in the given code page. If the result is convertable
-// into the code page, it will be returned as converted. If it is not, the
-// original escaped string will be converted into a wide string and returned.
-std::wstring UnescapeAndDecodeURLComponent(const std::string& text,
- const char* codepage,
- UnescapeRule::Type rules);
-inline std::wstring UnescapeAndDecodeUTF8URLComponent(
- const std::string& text,
- UnescapeRule::Type rules) {
- return UnescapeAndDecodeURLComponent(text, "UTF-8", rules);
-}
+// result as being encoded as UTF-8. If the result is convertable into UTF-8, it
+// will be returned as converted. If it is not, the original escaped string will
+// be converted into a wide string and returned.
+//
+// |offset_for_adjustment| may be NULL; if not, it is an offset into |text| that
+// will be adjusted to point at the same logical place in the result string. If
+// this isn't possible because it points into the middle of an escape sequence
+// or past the end of the string, it will be set to std::wstring::npos.
+std::wstring UnescapeAndDecodeUTF8URLComponent(const std::string& text,
+ UnescapeRule::Type rules,
+ size_t* offset_for_adjustment);
// Deprecated ------------------------------------------------------------------
« no previous file with comments | « chrome/browser/views/url_picker.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698