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

Side by Side Diff: ui/android/java/src/org/chromium/ui/base/LocalizationUtils.java

Issue 1828193002: DCHECK that jstring to C++ string conversions don't pass in null. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: braces Created 4 years, 8 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 | « components/gcm_driver/gcm_driver_android.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 package org.chromium.ui.base; 5 package org.chromium.ui.base;
6 6
7 import android.content.res.Configuration; 7 import android.content.res.Configuration;
8 import android.view.View; 8 import android.view.View;
9 9
10 import org.chromium.base.ApiCompatibilityUtils; 10 import org.chromium.base.ApiCompatibilityUtils;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 return sIsLayoutRtl.booleanValue(); 60 return sIsLayoutRtl.booleanValue();
61 } 61 }
62 62
63 /** 63 /**
64 * Jni binding to base::i18n::GetFirstStrongCharacterDirection 64 * Jni binding to base::i18n::GetFirstStrongCharacterDirection
65 * @param string String to decide the direction. 65 * @param string String to decide the direction.
66 * @return One of the UNKNOWN_DIRECTION, RIGHT_TO_LEFT, and LEFT_TO_RIGHT. 66 * @return One of the UNKNOWN_DIRECTION, RIGHT_TO_LEFT, and LEFT_TO_RIGHT.
67 */ 67 */
68 public static int getFirstStrongCharacterDirection(String string) { 68 public static int getFirstStrongCharacterDirection(String string) {
69 assert string != null;
69 return nativeGetFirstStrongCharacterDirection(string); 70 return nativeGetFirstStrongCharacterDirection(string);
70 } 71 }
71 72
72 /** 73 /**
73 * Jni binding to ui::TimeFormat::TimeRemaining. Converts milliseconds to 74 * Jni binding to ui::TimeFormat::TimeRemaining. Converts milliseconds to
74 * time remaining format : "3 mins left", "2 days left". 75 * time remaining format : "3 mins left", "2 days left".
75 * @param timeInMillis time in milliseconds 76 * @param timeInMillis time in milliseconds
76 * @return time remaining 77 * @return time remaining
77 */ 78 */
78 public static String getDurationString(long timeInMillis) { 79 public static String getDurationString(long timeInMillis) {
79 return nativeGetDurationString(timeInMillis); 80 return nativeGetDurationString(timeInMillis);
80 } 81 }
81 82
82 private static native int nativeGetFirstStrongCharacterDirection(String stri ng); 83 private static native int nativeGetFirstStrongCharacterDirection(String stri ng);
83 84
84 private static native String nativeGetDurationString(long timeInMillis); 85 private static native String nativeGetDurationString(long timeInMillis);
85 } 86 }
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698