Chromium Code Reviews| Index: chrome/browser/android/customtabs/origin_verifier.h |
| diff --git a/chrome/browser/android/customtabs/origin_verifier.h b/chrome/browser/android/customtabs/origin_verifier.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..22d283b5577294190c48a23c02f899e3a6e79b2c |
| --- /dev/null |
| +++ b/chrome/browser/android/customtabs/origin_verifier.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright (c) 2017 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_ANDROID_CUSTOMTABS_ORIGIN_VERIFIER_H_ |
| +#define CHROME_BROWSER_ANDROID_CUSTOMTABS_ORIGIN_VERIFIER_H_ |
| + |
| +#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.
|
| +#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.
|
| +#include "net/url_request/url_fetcher.h" |
| +#include "net/url_request/url_fetcher_delegate.h" |
| +#include "net/url_request/url_request_context_getter.h" |
| + |
| +namespace base { |
| +class DictionaryValue; |
| +} |
| + |
| +namespace customtabs { |
| + |
| +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.
|
| + public: |
| + OriginVerifier(JNIEnv* env, jobject obj); |
| + ~OriginVerifier(); |
| + |
| + void VerifyOrigin(JNIEnv* env, |
| + const base::android::JavaParamRef<jobject>& obj, |
| + const base::android::JavaParamRef<jstring>& j_package_name, |
| + const base::android::JavaParamRef<jstring>& j_fingerprint, |
| + const base::android::JavaParamRef<jstring>& j_origin); |
| + 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.
|
| + |
| + 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
|
| + std::unique_ptr<base::DictionaryValue> response); |
| + |
| + private: |
| + std::unique_ptr<digital_asset_links::DigitalAssetLinksHandler> |
| + asset_link_handler_; |
| + |
| + base::android::ScopedJavaGlobalRef<jobject> jobject_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(OriginVerifier); |
| +}; |
| + |
| +bool RegisterOriginVerifier(JNIEnv* env); |
| +} // namespace customtabs |
| + |
| +#endif // CHROME_BROWSER_ANDROID_CUSTOMTABS_ORIGIN_VERIFIER_H_ |