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

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

Issue 2074093002: Add a unittest for image_data_fetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use only a single callback object in the FetchImageData_MultipleRequests Created 4 years, 6 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
« no previous file with comments | « components/image_fetcher/BUILD.gn ('k') | components/image_fetcher/image_data_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // Method inherited from URLFetcherDelegate 43 // Method inherited from URLFetcherDelegate
44 void OnURLFetchComplete(const net::URLFetcher* source) override; 44 void OnURLFetchComplete(const net::URLFetcher* source) override;
45 45
46 // All active image url requests. 46 // All active image url requests.
47 std::map<const net::URLFetcher*, std::unique_ptr<ImageDataFetcherRequest>> 47 std::map<const net::URLFetcher*, std::unique_ptr<ImageDataFetcherRequest>>
48 pending_requests_; 48 pending_requests_;
49 49
50 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 50 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
51 51
52 // The next ID to use for a newly created URLFetcher. Each URLFetcher gets an
53 // id when it is created. The |url_fetcher_id_| is incremented by one for each
54 // newly created URLFetcher. The URLFetcher ID can be used during testing to
55 // get individual URLFetchers and modify their state. Outside of tests this ID
56 // is not used.
57 int next_url_fetcher_id_;
58
52 DISALLOW_COPY_AND_ASSIGN(ImageDataFetcher); 59 DISALLOW_COPY_AND_ASSIGN(ImageDataFetcher);
53 }; 60 };
54 61
55 } // namespace image_fetcher 62 } // namespace image_fetcher
56 63
57 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_DATA_FETCHER_H_ 64 #endif // COMPONENTS_IMAGE_FETCHER_IMAGE_DATA_FETCHER_H_
OLDNEW
« no previous file with comments | « components/image_fetcher/BUILD.gn ('k') | components/image_fetcher/image_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698