Index: chrome/browser/android/webapps/webapp_registry.cc |
diff --git a/chrome/browser/android/webapps/webapp_registry.cc b/chrome/browser/android/webapps/webapp_registry.cc |
index 588e3addc1e56a0602129895bf8db357899a680a..e63f5487302ab086c885f3ffc239d811ee1a01d4 100644 |
--- a/chrome/browser/android/webapps/webapp_registry.cc |
+++ b/chrome/browser/android/webapps/webapp_registry.cc |
@@ -26,6 +26,18 @@ void WebappRegistry::UnregisterWebapps( |
callback_pointer); |
} |
+// static |
+void WebappRegistry::ClearWebappHistory(const base::Closure& callback) { |
+ JNIEnv* env = base::android::AttachCurrentThread(); |
+ uintptr_t callback_pointer = reinterpret_cast<uintptr_t>( |
+ new base::Closure(callback)); |
+ |
+ Java_WebappRegistry_clearWebappHistory( |
+ env, |
+ base::android::GetApplicationContext(), |
+ callback_pointer); |
+} |
+ |
// Callback used by Java when all web apps have been unregistered. |
void OnWebappsUnregistered(JNIEnv* env, |
const JavaParamRef<jclass>& klass, |
@@ -35,6 +47,15 @@ void OnWebappsUnregistered(JNIEnv* env, |
delete callback; |
} |
+// Callback used by Java when all web app last used times have been cleared. |
+void OnClearedWebappHistory(JNIEnv* env, |
+ const JavaParamRef<jclass>& klass, |
+ jlong jcallback) { |
+ base::Closure* callback = reinterpret_cast<base::Closure*>(jcallback); |
+ callback->Run(); |
+ delete callback; |
+} |
+ |
// static |
bool WebappRegistry::RegisterWebappRegistry(JNIEnv* env) { |
return RegisterNativesImpl(env); |