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 f021511ddb6f72c66cba173fce9c6e735ff16b80..318244d3805794ea16c6597386f46d80605206b3 100644 |
--- a/chrome/browser/android/webapps/webapp_registry.cc |
+++ b/chrome/browser/android/webapps/webapp_registry.cc |
@@ -24,6 +24,17 @@ void WebappRegistry::UnregisterWebapps(const base::Closure& callback) { |
callback_pointer); |
} |
+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>& clazz, |
@@ -33,6 +44,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>& clazz, |
+ jlong jcallback) { |
+ base::Closure* callback = reinterpret_cast<base::Closure*>(jcallback); |
+ callback->Run(); |
+ delete callback; |
+} |
+ |
// static |
bool WebappRegistry::RegisterWebappRegistry(JNIEnv* env) { |
return RegisterNativesImpl(env); |