blob: 2269d76ecbbbf1532075a8eccadba13e7b7a3a01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "android_webview/native/aw_form_database.h"
#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/browser/aw_content_browser_client.h"
#include "android_webview/browser/aw_form_database_service.h"
#include "base/android/jni_android.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "jni/AwFormDatabase_jni.h"
namespace android_webview {
namespace {
AwFormDatabaseService* GetFormDatabaseService() {
AwBrowserContext* context = AwContentBrowserClient::GetAwBrowserContext();
AwFormDatabaseService* service = context->GetFormDatabaseService();
return service;
}
} // anonymous namespace
// static
jboolean HasFormData(JNIEnv*, jclass) {
return GetFormDatabaseService()->HasFormData();
}
// static
void ClearFormData(JNIEnv*, jclass) {
GetFormDatabaseService()->ClearFormData();
}
bool RegisterAwFormDatabase(JNIEnv* env) {
return RegisterNativesImpl(env);
}
} // namespace android_webview
|