OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2017 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_ANDROID_CUSTOMTABS_ORIGIN_VERIFIER_H_ | |
6 #define CHROME_BROWSER_ANDROID_CUSTOMTABS_ORIGIN_VERIFIER_H_ | |
7 | |
8 #include "base/android/jni_weak_ref.h" | |
nyquist
2017/04/19 06:35:56
Nit: Did you mean base/android/scoped_java_ref.h ?
Yusuf
2017/04/26 00:51:36
Done.
| |
9 #include "chrome/browser/android/digital_asset_links/digital_asset_links_handler .h" | |
nyquist
2017/04/19 06:35:56
Nit: Could digital_asset_links::DigitalAssetLinksH
Yusuf
2017/04/26 00:51:36
Done.
| |
10 #include "net/url_request/url_fetcher.h" | |
11 #include "net/url_request/url_fetcher_delegate.h" | |
12 #include "net/url_request/url_request_context_getter.h" | |
13 | |
14 namespace base { | |
15 class DictionaryValue; | |
16 } | |
17 | |
18 namespace customtabs { | |
19 | |
20 class OriginVerifier { | |
nyquist
2017/04/19 06:35:56
Nit: Could you add a class-level comment to refer
Yusuf
2017/04/26 00:51:36
Done.
| |
21 public: | |
22 OriginVerifier(JNIEnv* env, jobject obj); | |
23 ~OriginVerifier(); | |
24 | |
25 void VerifyOrigin(JNIEnv* env, | |
26 const base::android::JavaParamRef<jobject>& obj, | |
27 const base::android::JavaParamRef<jstring>& j_package_name, | |
28 const base::android::JavaParamRef<jstring>& j_fingerprint, | |
29 const base::android::JavaParamRef<jstring>& j_origin); | |
30 void Destroy(JNIEnv* env, const base::android::JavaRef<jobject>& obj); | |
nyquist
2017/04/19 06:35:56
Nit: Empty line before this?
Yusuf
2017/04/26 00:51:36
Done.
| |
31 | |
32 void OnRelationshipCheckComplete( | |
nyquist
2017/04/19 06:35:56
Nit: Should this public method be documented to cl
Yusuf
2017/04/26 00:51:36
Moved to private
| |
33 std::unique_ptr<base::DictionaryValue> response); | |
34 | |
35 private: | |
36 std::unique_ptr<digital_asset_links::DigitalAssetLinksHandler> | |
37 asset_link_handler_; | |
38 | |
39 base::android::ScopedJavaGlobalRef<jobject> jobject_; | |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(OriginVerifier); | |
42 }; | |
43 | |
44 bool RegisterOriginVerifier(JNIEnv* env); | |
45 } // namespace customtabs | |
46 | |
47 #endif // CHROME_BROWSER_ANDROID_CUSTOMTABS_ORIGIN_VERIFIER_H_ | |
OLD | NEW |