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

Unified Diff: base/android/jni_weak_ref.h

Issue 2268553002: Small improvements to JNI references. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Learn about, and then fix, the most vexing parse. :) Created 4 years, 4 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 | base/android/jni_weak_ref.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/jni_weak_ref.h
diff --git a/base/android/jni_weak_ref.h b/base/android/jni_weak_ref.h
index c8510465698510d90d8cf200a2657a7aaf42371e..2ae5cce02755c2833a2ab97acd71428a63cec2a5 100644
--- a/base/android/jni_weak_ref.h
+++ b/base/android/jni_weak_ref.h
@@ -18,14 +18,18 @@ class BASE_EXPORT JavaObjectWeakGlobalRef {
public:
JavaObjectWeakGlobalRef();
JavaObjectWeakGlobalRef(const JavaObjectWeakGlobalRef& orig);
+ JavaObjectWeakGlobalRef(JavaObjectWeakGlobalRef&& orig);
JavaObjectWeakGlobalRef(JNIEnv* env, jobject obj);
+ JavaObjectWeakGlobalRef(JNIEnv* env,
+ const base::android::JavaRef<jobject>& obj);
virtual ~JavaObjectWeakGlobalRef();
void operator=(const JavaObjectWeakGlobalRef& rhs);
+ void operator=(JavaObjectWeakGlobalRef&& rhs);
base::android::ScopedJavaLocalRef<jobject> get(JNIEnv* env) const;
- bool is_empty() const { return obj_ == NULL; }
+ bool is_empty() const { return obj_ == nullptr; }
void reset();
« no previous file with comments | « no previous file | base/android/jni_weak_ref.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698