Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_ H_ | |
| 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDROID_ H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 #include "base/android/scoped_java_ref.h" | |
| 10 #include "base/macros.h" | |
| 11 #include "base/memory/weak_ptr.h" | |
| 12 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | |
| 13 | |
| 14 class SupervisedUserService; | |
| 15 | |
| 16 class SupervisedUserContentProvider { | |
| 17 public: | |
| 18 SupervisedUserContentProvider( | |
| 19 JNIEnv* env, | |
| 20 const base::android::JavaParamRef<jobject>& caller); | |
| 21 virtual ~SupervisedUserContentProvider(); | |
| 22 | |
| 23 void ShouldProceed(JNIEnv* env, | |
| 24 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.
| |
| 25 const base::android::JavaParamRef<jstring>& url); | |
| 26 void RequestInsert(JNIEnv* env, | |
| 27 jobject caller, | |
| 28 const base::android::JavaParamRef<jstring>& url); | |
| 29 | |
| 30 void SetFilterForTesting(JNIEnv* env, jobject caller); | |
| 31 | |
| 32 static bool Register(JNIEnv* env); | |
| 33 | |
| 34 private: | |
| 35 void OnQueryComplete(SupervisedUserURLFilter::FilteringBehavior behavior, | |
| 36 SupervisedUserURLFilter::FilteringBehaviorReason reason, | |
| 37 bool /* uncertain */); | |
| 38 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.
| |
| 39 Profile* profile_; | |
| 40 base::android::ScopedJavaGlobalRef<jobject> java_content_provider_; | |
| 41 | |
| 42 base::WeakPtrFactory<SupervisedUserContentProvider> weak_factory_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(SupervisedUserContentProvider); | |
| 45 }; | |
| 46 | |
| 47 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_CONTENT_PROVIDER_ANDRO ID_H_ | |
| OLD | NEW |