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

Side by Side Diff: chrome/browser/android/webapps/webapp_registry.cc

Issue 1329083002: Clear webapp storage when site data is cleared (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add initial tests and fix compile 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/android/webapps/webapp_registry.h"
6
7 #include <jni.h>
8
9 #include "base/android/jni_android.h"
10 #include "base/callback.h"
11 #include "chrome/browser/io_thread.h"
12 #include "content/public/browser/browser_thread.h"
13 #include "jni/WebappRegistry_jni.h"
14
15 // static
16 void WebappRegistry::UnregisterWebappsOnIOThread(
17 const base::Closure& callback) {
18 DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
19
20 JNIEnv* env = base::android::AttachCurrentThread();
21 Java_WebappRegistry_unregisterAllWebappsInBackground(
22 env,
23 base::android::GetApplicationContext());
24
25 content::BrowserThread::PostTask(
26 content::BrowserThread::UI,
27 FROM_HERE,
28 callback);
29 }
30
31 // static
32 bool WebappRegistry::RegisterWebappRegistry(JNIEnv* env) {
33 return RegisterNativesImpl(env);
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698