Chromium Code Reviews| Index: chrome/browser/ui/omnibox/omnibox_view.h |
| diff --git a/chrome/browser/ui/omnibox/omnibox_view.h b/chrome/browser/ui/omnibox/omnibox_view.h |
| index 9fb5b943a747f160e079815b65f32ba5156d46d4..d16d54138901d9d5955ca7486fec8c7cb0e281d9 100644 |
| --- a/chrome/browser/ui/omnibox/omnibox_view.h |
| +++ b/chrome/browser/ui/omnibox/omnibox_view.h |
| @@ -231,10 +231,18 @@ class OmniboxView { |
| virtual int OnPerformDrop(const ui::DropTargetEvent& event) = 0; |
| #endif |
| - // Returns a string with any leading javascript schemas stripped from the |
| - // input text. |
| + // Returns |text| with any leading javascript schemas stripped. |
| static string16 StripJavascriptSchemas(const string16& text); |
| + // First, calls StripJavascriptSchemas(). Then automatically collapses |
| + // internal whitespace as follows: |
| + // * If the only whitespace in |text| is newlines, users are most likely |
| + // pasting in URLs split into multiple lines by terminals, email programs, |
| + // etc. So all newlines are removed. |
| + // * Otherwise, users may be pasting in search data, e.g. street addresses. In |
| + // this case newlines are converted to spaces. |
|
Peter Kasting
2013/08/09 18:11:59
Nit: "...this case, runs of whitespace are collaps
jfweitz
2013/08/09 18:49:55
Done.
|
| + static string16 SanitizeTextForPaste(const string16& text); |
| + |
| // Returns the current clipboard contents as a string that can be pasted in. |
| // In addition to just getting CF_UNICODETEXT out, this can also extract URLs |
| // from bookmarks on the clipboard. |