| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ |
| 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ | 6 #define CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 | 12 |
| 13 // WebappRegistry is the C++ counterpart of | 13 // WebappRegistry is the C++ counterpart of |
| 14 // org.chromium.chrome.browser.webapp's WebappRegistry in Java. | 14 // org.chromium.chrome.browser.webapp's WebappRegistry in Java. |
| 15 class WebappRegistry { | 15 class WebappRegistry { |
| 16 public: | 16 public: |
| 17 // Registers JNI hooks. | 17 // Registers JNI hooks. |
| 18 static bool RegisterWebappRegistry(JNIEnv* env); | 18 static bool RegisterWebappRegistry(JNIEnv* env); |
| 19 | 19 |
| 20 // Cleans up data stored by web apps. | 20 // Cleans up data stored by web apps. |
| 21 static void UnregisterWebapps(const base::Closure& callback); | 21 static void UnregisterWebapps(const base::Closure& callback); |
| 22 | 22 |
| 23 // Removes history data (last used time and URLs) stored by web apps, whilst |
| 24 // leaving other data intact. |
| 25 static void ClearWebappHistory(const base::Closure& callback); |
| 26 |
| 23 private: | 27 private: |
| 24 ~WebappRegistry() = delete; | 28 ~WebappRegistry() = delete; |
| 25 | 29 |
| 26 DISALLOW_IMPLICIT_CONSTRUCTORS(WebappRegistry); | 30 DISALLOW_IMPLICIT_CONSTRUCTORS(WebappRegistry); |
| 27 }; | 31 }; |
| 28 | 32 |
| 29 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ | 33 #endif // CHROME_BROWSER_ANDROID_WEBAPPS_WEBAPP_REGISTRY_H_ |
| OLD | NEW |