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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxViewUtil.java

Issue 298523002: [Android] Use the omnibox paste sanitizing code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra blank line Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxViewUtil.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxViewUtil.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxViewUtil.java
new file mode 100644
index 0000000000000000000000000000000000000000..fc30b4a163adec1161f8b86728254b32a4328c8a
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxViewUtil.java
@@ -0,0 +1,23 @@
+// Copyright 2014 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.
+
+package org.chromium.chrome.browser.omnibox;
+
+/**
+ * Utilities for the Omnibox view component.
+ */
+public class OmniboxViewUtil {
+
+ /**
+ * Sanitizing the given string to be safe to paste into the omnibox.
+ *
+ * @param clipboardString The string from the clipboard.
+ * @return The sanitized version of the string.
+ */
+ public static String sanitizeTextForPaste(String clipboardString) {
+ return nativeSanitizeTextForPaste(clipboardString);
+ }
+
+ private static native String nativeSanitizeTextForPaste(String clipboardString);
+}
« no previous file with comments | « no previous file | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698