Chromium Code Reviews| 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_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>)> | |
|
nyquist
2017/04/19 06:35:57
Nit: On a failure what will the parameter to this
Yusuf
2017/04/26 00:51:36
Documented the failure case. On success depends on
nyquist
2017/04/27 04:38:25
Awesome with the referral to the REST API. Very he
| |
| 21 RelationshipCheckResultCallback; | |
| 22 | |
| 23 class DigitalAssetLinksHandler : public net::URLFetcherDelegate { | |
|
nyquist
2017/04/19 06:35:57
Nit: What is this class used for? What is the life
Yusuf
2017/04/26 00:51:36
Done.
| |
| 24 public: | |
| 25 DigitalAssetLinksHandler( | |
|
nyquist
2017/04/19 06:35:57
Nit: Single argument constructors should be marked
Yusuf
2017/04/26 00:51:36
Done.
| |
| 26 const scoped_refptr<net::URLRequestContextGetter>& request_context); | |
| 27 ~DigitalAssetLinksHandler() override; | |
| 28 | |
| 29 bool CheckDigitalAssetLinkRelationship( | |
|
nyquist
2017/04/19 06:35:57
Nit: Could you explain what this method does?
What
Yusuf
2017/04/26 00:51:36
Done.
| |
| 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 scoped_refptr<net::URLRequestContextGetter> request_context_; | |
| 41 | |
| 42 std::unique_ptr<net::URLFetcher> url_fetcher_; | |
| 43 | |
| 44 // The callback for receiving a URLFetcher result. | |
| 45 RelationshipCheckResultCallback callback_; | |
|
nyquist
2017/04/19 06:35:57
So, this is a little bit confusing. It's passed in
Yusuf
2017/04/26 00:51:36
Done.
| |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(DigitalAssetLinksHandler); | |
| 48 }; | |
| 49 | |
| 50 } // namespace digital_asset_links | |
| 51 | |
| 52 #endif // CHROME_BROWSER_ANDROID_DIGITAL_ASSET_LINKS_DIGITAL_ASSET_LINKS_HANDLE R_H_ | |
| OLD | NEW |