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

Unified Diff: chrome/browser/android/chrome_application.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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
Index: chrome/browser/android/chrome_application.cc
diff --git a/chrome/browser/android/chrome_application.cc b/chrome/browser/android/chrome_application.cc
index a5661ef46c6021c986c4eafa596c9c87e6ab9107..241bdd29574f469feab69b1e134d3805e09bf87e 100644
--- a/chrome/browser/android/chrome_application.cc
+++ b/chrome/browser/android/chrome_application.cc
@@ -81,12 +81,13 @@ void ChangeAppStatusOnIOThread(SafeBrowsingService* sb_service,
} // namespace
-static ScopedJavaLocalRef<jstring> GetBrowserUserAgent(JNIEnv* env,
- jclass clazz) {
+static ScopedJavaLocalRef<jstring> GetBrowserUserAgent(
+ JNIEnv* env,
+ const JavaParamRef<jclass>& clazz) {
return ConvertUTF8ToJavaString(env, GetUserAgent());
}
-static void FlushPersistentData(JNIEnv* env, jclass obj) {
+static void FlushPersistentData(JNIEnv* env, const JavaParamRef<jclass>& obj) {
// Commit the prending writes for all the loaded profiles.
std::vector<Profile*> loaded_profiles =
g_browser_process->profile_manager()->GetLoadedProfiles();
@@ -97,14 +98,16 @@ static void FlushPersistentData(JNIEnv* env, jclass obj) {
g_browser_process->local_state()->CommitPendingWrite();
}
-static void RemoveSessionCookies(JNIEnv* env, jclass obj) {
+static void RemoveSessionCookies(JNIEnv* env, const JavaParamRef<jclass>& obj) {
std::vector<Profile*> loaded_profiles =
g_browser_process->profile_manager()->GetLoadedProfiles();
std::for_each(loaded_profiles.begin(), loaded_profiles.end(),
RemoveSessionCookiesForProfile);
}
-static void ChangeAppStatus(JNIEnv* env, jclass obj, jboolean foreground) {
+static void ChangeAppStatus(JNIEnv* env,
+ const JavaParamRef<jclass>& obj,
+ jboolean foreground) {
content::BrowserThread::PostTask(
content::BrowserThread::IO, FROM_HERE,
base::Bind(&ChangeAppStatusOnIOThread,

Powered by Google App Engine
This is Rietveld 408576698