OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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_MEDIA_ANDROID_PROVISION_URL_PROVISION_FETCHER_H_ | |
6 #define CHROME_BROWSER_MEDIA_ANDROID_PROVISION_URL_PROVISION_FETCHER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "media/base/android/provision_fetcher.h" | |
10 #include "net/url_request/url_fetcher.h" | |
11 #include "net/url_request/url_fetcher_delegate.h" | |
12 | |
13 namespace media { | |
14 | |
15 // The ProvisionFetcher that retrieves the data by HTTP POST request. | |
16 | |
17 class URLProvisionFetcher : public ProvisionFetcher, | |
18 public net::URLFetcherDelegate { | |
19 public: | |
20 explicit URLProvisionFetcher(net::URLRequestContextGetter* context); | |
21 ~URLProvisionFetcher() override; | |
22 | |
23 // media::ProvisionFetcher implementation. | |
24 void Retrieve(const std::string& default_url, | |
25 const std::string& request_data, | |
26 ResponseCallback cb) override; | |
xhwang
2015/11/02 20:37:04
nit, see below: s/ResponseCallback cb/const Respon
Tima Vaisburd
2015/11/05 02:24:07
Done.
| |
27 | |
28 // public net::URLFetcherDelegate implementation. | |
29 void OnURLFetchComplete(const net::URLFetcher* source) override; | |
30 | |
31 private: | |
32 net::URLRequestContextGetter* url_request_context_; | |
33 scoped_ptr<net::URLFetcher> request_; | |
34 ResponseCallback response_cb_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(URLProvisionFetcher); | |
37 }; | |
38 | |
39 class URLProvisionFetcherFactory : public ProvisionFetcherFactory { | |
40 public: | |
41 URLProvisionFetcherFactory() {} | |
42 ~URLProvisionFetcherFactory() {} | |
43 | |
44 scoped_ptr<ProvisionFetcher> CreateFetcher() const override; | |
45 }; | |
46 | |
47 } // namespace media | |
48 | |
49 #endif // CHROME_BROWSER_MEDIA_ANDROID_PROVISION_URL_PROVISION_FETCHER_H_ | |
OLD | NEW |