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

Unified Diff: chrome/browser/supervised_user/supervised_user_content_provider_android.h

Issue 1452603002: Supervised user web restrictions content provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Respond to comments Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/supervised_user/supervised_user_content_provider_android.h
diff --git a/chrome/browser/supervised_user/supervised_user_content_provider_android.h b/chrome/browser/supervised_user/supervised_user_content_provider_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..c28214a600c67313177b61f3f23091baf4e26080
--- /dev/null
+++ b/chrome/browser/supervised_user/supervised_user_content_provider_android.h
@@ -0,0 +1,47 @@
+// Copyright 2015 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.
+
+#ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_H_
+#define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_H_
+
+#include <jni.h>
+#include "base/android/scoped_java_ref.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/supervised_user/supervised_user_url_filter.h"
+
+class SupervisedUserService;
+
+class SupervisedUserContentProvider {
+ public:
+ SupervisedUserContentProvider(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jobject>& caller);
+ virtual ~SupervisedUserContentProvider();
+
+ void ShouldProceed(JNIEnv* env,
+ jobject caller,
Bernhard Bauer 2015/12/16 17:52:09 This should also be const base::android::JavaParam
aberent 2015/12/16 22:15:17 Done.
+ const base::android::JavaParamRef<jstring>& url);
+ void RequestInsert(JNIEnv* env,
+ jobject caller,
+ const base::android::JavaParamRef<jstring>& url);
+
+ void SetFilterForTesting(JNIEnv* env, jobject caller);
+
+ static bool Register(JNIEnv* env);
+
+ private:
+ void OnQueryComplete(SupervisedUserURLFilter::FilteringBehavior behavior,
+ SupervisedUserURLFilter::FilteringBehaviorReason reason,
+ bool /* uncertain */);
+ void OnInsertRequestSendComplete(bool sentOk);
Bernhard Bauer 2015/12/16 17:52:09 Nit: |sent_ok| for native code.
aberent 2015/12/16 22:15:17 Done.
Bernhard Bauer 2015/12/17 11:13:21 Not quite 😃
aberent 2015/12/17 14:59:08 Done.
+ Profile* profile_;
+ base::android::ScopedJavaGlobalRef<jobject> java_content_provider_;
+
+ base::WeakPtrFactory<SupervisedUserContentProvider> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(SupervisedUserContentProvider);
+};
+
+#endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698