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

Unified Diff: base/android/jni_helper.h

Issue 247263009: Rename jni_helper.h to jni_weak_ref.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/BUILD.gn ('k') | base/android/jni_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_helper.h
diff --git a/base/android/jni_helper.h b/base/android/jni_helper.h
index 895bf95a9d12786838a173ff55884477f1b8a469..111fa222f432348f6c061ab01101a25a071da6af 100644
--- a/base/android/jni_helper.h
+++ b/base/android/jni_helper.h
@@ -2,40 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_ANDROID_JNI_HELPER_H_
-#define BASE_ANDROID_JNI_HELPER_H_
-
-#include <jni.h>
-
-#include "base/base_export.h"
-#include "base/android/scoped_java_ref.h"
-
-// Manages WeakGlobalRef lifecycle.
-// This class is not thread-safe w.r.t. get() and reset(). Multiple threads may
-// safely use get() concurrently, but if the user calls reset() (or of course,
-// calls the destructor) they'll need to provide their own synchronization.
-class BASE_EXPORT JavaObjectWeakGlobalRef {
- public:
- JavaObjectWeakGlobalRef();
- JavaObjectWeakGlobalRef(const JavaObjectWeakGlobalRef& orig);
- JavaObjectWeakGlobalRef(JNIEnv* env, jobject obj);
- virtual ~JavaObjectWeakGlobalRef();
-
- void operator=(const JavaObjectWeakGlobalRef& rhs);
-
- base::android::ScopedJavaLocalRef<jobject> get(JNIEnv* env) const;
-
- void reset();
-
- private:
- void Assign(const JavaObjectWeakGlobalRef& rhs);
-
- jweak obj_;
-};
-
-// Get the real object stored in the weak reference returned as a
-// ScopedJavaLocalRef.
-BASE_EXPORT base::android::ScopedJavaLocalRef<jobject> GetRealObject(
- JNIEnv* env, jweak obj);
-
-#endif // BASE_ANDROID_JNI_HELPER_H_
+// This file has been renamed. Please use the new name.
+// TODO(newt): Remove this file when all users have been updated.
+#include "base/android/jni_weak_ref.h"
« no previous file with comments | « base/BUILD.gn ('k') | base/android/jni_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698