diff options
author | Ben Murdoch <benm@google.com> | 2011-02-25 17:16:53 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-02-28 14:09:41 +0000 |
commit | 9d25cad4fe524601a78e3d8c1844b8708537401f (patch) | |
tree | ad295972dadb5d8e1b5efc0d84f763fc90485a28 /android | |
parent | d8e800e5cd4b5ff1c84124f27b98f9c174ec2738 (diff) | |
download | external_chromium-9d25cad4fe524601a78e3d8c1844b8708537401f.zip external_chromium-9d25cad4fe524601a78e3d8c1844b8708537401f.tar.gz external_chromium-9d25cad4fe524601a78e3d8c1844b8708537401f.tar.bz2 |
Remove native localised strings cache.
We now cache these strings java side using WeakReferences.
See frameworks/base change:
Ibedcaab5ee781699b41b5c03aae866d1d82bb570
Change-Id: Icff9e31e70ac93ef1519c4ecf1258b5addb3f625
Diffstat (limited to 'android')
-rw-r--r-- | android/app/l10n_util.cc | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/android/app/l10n_util.cc b/android/app/l10n_util.cc index 1787313..c9b17bf 100644 --- a/android/app/l10n_util.cc +++ b/android/app/l10n_util.cc @@ -42,7 +42,6 @@ class JNIHelper { private: bool mInited; jclass mClassRef; - string16 mMessageCache[ANDROID_L10N_IDS_MESSAGE_COUNT]; android::Mutex mGetStringLock; }; @@ -71,15 +70,10 @@ string16 JNIHelper::getLocalisedString(int message_id) mInited = true; } - if (!mMessageCache[message_id].empty()) - return mMessageCache[message_id]; - - static jmethodID getLocalisedString = env->GetStaticMethodID(mClassRef, "getLocalisedString", "(I)Ljava/lang/String;"); jstring result = static_cast<jstring>(env->CallStaticObjectMethod(mClassRef, getLocalisedString, message_id)); string16 str = android::JstringToString16(env, result); env->DeleteLocalRef(result); - mMessageCache[message_id] = str; return str; } |