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

Side by Side Diff: chrome/browser/android/customtabs/origin_verifier.h

Issue 2767333006: Add Digital Asset Links verification for postMessage API (Closed)
Patch Set: lizeb@ commetns Created 3 years, 8 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 (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"
9 #include "chrome/browser/android/digital_asset_links/digital_asset_links_handler .h"
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 {
21 public:
22 explicit OriginVerifier(JNIEnv* env, jobject obj);
Benoit L 2017/04/04 18:44:12 nit: explicit is only needed for single-parameter
Yusuf 2017/04/05 00:20:42 Done.
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);
31
32 void OnRelationshipCheckComplete(
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698