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

Unified Diff: chrome/browser/android/preferences/website_preference_bridge.cc

Issue 1326763009: jni: Forbid inappropriate JNI parameter conversions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GN-only mojo, and chromecast 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/preferences/website_preference_bridge.cc
diff --git a/chrome/browser/android/preferences/website_preference_bridge.cc b/chrome/browser/android/preferences/website_preference_bridge.cc
index 9d1f8e9ab2d59ca024fefd4713a45037f9f7f096..5da7038dcf2fa46e930a91006c3844b3b0c69c93 100644
--- a/chrome/browser/android/preferences/website_preference_bridge.cc
+++ b/chrome/browser/android/preferences/website_preference_bridge.cc
@@ -697,8 +697,7 @@ class StorageDataDeleter :
class LocalStorageInfoReadyCallback {
public:
- LocalStorageInfoReadyCallback(
- const ScopedJavaLocalRef<jobject>& java_callback)
+ explicit LocalStorageInfoReadyCallback(const JavaRef<jobject>& java_callback)
: env_(base::android::AttachCurrentThread()),
java_callback_(java_callback) {
}
@@ -755,8 +754,7 @@ static void FetchLocalStorageInfo(JNIEnv* env,
new BrowsingDataLocalStorageHelper(profile));
// local_storage_callback will delete itself when it is run.
LocalStorageInfoReadyCallback* local_storage_callback =
- new LocalStorageInfoReadyCallback(
- ScopedJavaLocalRef<jobject>(env, java_callback));
+ new LocalStorageInfoReadyCallback(java_callback);
local_storage_helper->StartFetching(
base::Bind(&LocalStorageInfoReadyCallback::OnLocalStorageModelInfoLoaded,
base::Unretained(local_storage_callback)));
@@ -768,8 +766,7 @@ static void FetchStorageInfo(JNIEnv* env,
Profile* profile = ProfileManager::GetActiveUserProfile();
scoped_refptr<StorageInfoFetcher> storage_info_fetcher(new StorageInfoFetcher(
content::BrowserContext::GetDefaultStoragePartition(
- profile)->GetQuotaManager(),
- ScopedJavaLocalRef<jobject>(env, java_callback)));
+ profile)->GetQuotaManager(), java_callback));
storage_info_fetcher->Run();
}
@@ -794,8 +791,7 @@ static void ClearStorageData(JNIEnv* env,
content::BrowserContext::GetDefaultStoragePartition(
profile)->GetQuotaManager(),
host,
- static_cast<storage::StorageType>(type),
- ScopedJavaLocalRef<jobject>(env, java_callback)));
+ static_cast<storage::StorageType>(type), java_callback));
storage_data_deleter->Run();
}
« no previous file with comments | « chrome/browser/android/feedback/connectivity_checker.cc ('k') | chromecast/browser/android/cast_window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698