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

Side by Side Diff: chrome/browser/android/digital_asset_links/digital_asset_links_handler.h

Issue 2767333006: Add Digital Asset Links verification for postMessage API (Closed)
Patch Set: fix hex conversion logic 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_DIGITAL_ASSET_LINKS_DIGITAL_ASSET_LINKS_HANDLER_H _
6 #define CHROME_BROWSER_ANDROID_DIGITAL_ASSET_LINKS_DIGITAL_ASSET_LINKS_HANDLER_H _
7
8 #include "net/url_request/url_fetcher.h"
9 #include "net/url_request/url_fetcher_delegate.h"
10 #include "net/url_request/url_request_context_getter.h"
11
12 namespace base {
13 class DictionaryValue;
14 }
15
16 namespace digital_asset_links {
17
18 extern const char kDigitalAssetLinksCheckResponseKeyLinked[];
19
20 typedef base::Callback<void(std::unique_ptr<base::DictionaryValue>)>
21 RelationshipCheckResultCallback;
22
23 class DigitalAssetLinksHandler : public net::URLFetcherDelegate {
24 public:
25 DigitalAssetLinksHandler(
26 const scoped_refptr<net::URLRequestContextGetter>& request_context);
27 ~DigitalAssetLinksHandler() override;
28
29 bool CheckDigitalAssetLinkRelationship(
30 RelationshipCheckResultCallback listener,
31 const std::string& web_domain,
32 const std::string& package_name,
33 const std::string& fingerprint,
34 const std::string& relationship);
35
36 private:
37 // net::URLFetcherDelegate:
38 void OnURLFetchComplete(const net::URLFetcher* source) override;
39
40 // URL request context.
Benoit L 2017/04/07 15:04:55 nit: Remove this comment? (seems redundant with th
Yusuf 2017/04/07 23:38:41 Done.
41 scoped_refptr<net::URLRequestContextGetter> request_context_;
42
43 std::unique_ptr<net::URLFetcher> url_fetcher_;
44
45 // The callback for receiving a URLFether result.
Benoit L 2017/04/07 15:04:54 nit: URLFetcher.
Yusuf 2017/04/07 23:38:41 Done.
46 RelationshipCheckResultCallback callback_;
47
48 DISALLOW_COPY_AND_ASSIGN(DigitalAssetLinksHandler);
49 };
50
51 } // namespace digital_asset_links
52
53 #endif // CHROME_BROWSER_ANDROID_DIGITAL_ASSET_LINKS_DIGITAL_ASSET_LINKS_HANDLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698