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

Side by Side Diff: components/image_fetcher/image_data_fetcher.h

Issue 2652893005: Create the IOSImageDataFetcher (Closed)
Patch Set: Remove virtual Created 3 years, 10 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_DATA_FETCHER_H_ 5 #ifndef COMPONENTS_IMAGE_FETCHER_IMAGE_DATA_FETCHER_H_
6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_DATA_FETCHER_H_ 6 #define COMPONENTS_IMAGE_FETCHER_IMAGE_DATA_FETCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "components/data_use_measurement/core/data_use_user_data.h" 15 #include "components/data_use_measurement/core/data_use_user_data.h"
16 #include "net/url_request/url_fetcher_delegate.h" 16 #include "net/url_request/url_fetcher_delegate.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace net { 19 namespace net {
20 class URLFetcher; 20 class URLFetcher;
21 class URLRequestContextGetter; 21 class URLRequestContextGetter;
22 } // namespace net 22 } // namespace net
23 23
24 namespace image_fetcher { 24 namespace image_fetcher {
25 25
26 class ImageDataFetcher : public net::URLFetcherDelegate { 26 class ImageDataFetcher : public net::URLFetcherDelegate {
27 public: 27 public:
28 using ImageDataFetcherCallback = 28 using ImageDataFetcherCallback =
29 base::Callback<void(const std::string& image_data)>; 29 base::Callback<void(const std::string& image_data,
30 const net::URLFetcher* source)>;
Marc Treib 2017/01/25 10:37:55 You'll have to update the tests for the new param.
markusheintz_ 2017/01/25 12:03:45 It would be great to learn what motivates this cha
gambard 2017/01/25 12:09:45 The IOSImageDataFetcher class is using the URLFetc
30 31
31 using DataUseServiceName = data_use_measurement::DataUseUserData::ServiceName; 32 using DataUseServiceName = data_use_measurement::DataUseUserData::ServiceName;
32 33
33 explicit ImageDataFetcher( 34 explicit ImageDataFetcher(
34 net::URLRequestContextGetter* url_request_context_getter); 35 net::URLRequestContextGetter* url_request_context_getter);
35 ~ImageDataFetcher() override; 36 ~ImageDataFetcher() override;
36 37
37 // Sets a service name against which to track data usage. 38 // Sets a service name against which to track data usage.
38 void SetDataUseServiceName(DataUseServiceName data_use_service_name); 39 void SetDataUseServiceName(DataUseServiceName data_use_service_name);
39 40
(...skipping 23 matching lines...) Expand all
63 // get individual URLFetchers and modify their state. Outside of tests this ID 64 // get individual URLFetchers and modify their state. Outside of tests this ID
64 // is not used. 65 // is not used.
65 int next_url_fetcher_id_; 66 int next_url_fetcher_id_;
66 67
67 DISALLOW_COPY_AND_ASSIGN(ImageDataFetcher); 68 DISALLOW_COPY_AND_ASSIGN(ImageDataFetcher);
68 }; 69 };
69 70
70 } // namespace image_fetcher 71 } // namespace image_fetcher
71 72
72 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_DATA_FETCHER_H_ 73 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_DATA_FETCHER_H_
OLDNEW
« no previous file with comments | « no previous file | components/image_fetcher/image_data_fetcher.cc » ('j') | components/image_fetcher/ios/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698