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

Side by Side Diff: chrome/browser/search/suggestions/image_fetcher_impl.h

Issue 1016003004: [BitmapFetcher] Added reference to OnFetchComplete url (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chaging OnFetchComplete for bitmap fetcher Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_ 5 #ifndef CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
6 #define CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_ 6 #define CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 31
32 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override; 32 void SetImageFetcherDelegate(ImageFetcherDelegate* delegate) override;
33 33
34 void StartOrQueueNetworkRequest( 34 void StartOrQueueNetworkRequest(
35 const GURL& url, 35 const GURL& url,
36 const GURL& image_url, 36 const GURL& image_url,
37 base::Callback<void(const GURL&, const SkBitmap*)> callback) override; 37 base::Callback<void(const GURL&, const SkBitmap*)> callback) override;
38 38
39 private: 39 private:
40 // Inherited from BitmapFetcherDelegate. Runs on the UI thread. 40 // Inherited from BitmapFetcherDelegate. Runs on the UI thread.
41 void OnFetchComplete(const GURL image_url, const SkBitmap* bitmap) override; 41 void OnFetchComplete(const GURL& image_url, const SkBitmap* bitmap) override;
42 42
43 typedef std::vector<base::Callback<void(const GURL&, const SkBitmap*)> > 43 typedef std::vector<base::Callback<void(const GURL&, const SkBitmap*)> >
44 CallbackVector; 44 CallbackVector;
45 45
46 // State related to an image fetch (associated website url, image_url, 46 // State related to an image fetch (associated website url, image_url,
47 // fetcher, pending callbacks). 47 // fetcher, pending callbacks).
48 struct ImageRequest { 48 struct ImageRequest {
49 ImageRequest(); 49 ImageRequest();
50 // Struct takes ownership of |f|. 50 // Struct takes ownership of |f|.
51 explicit ImageRequest(chrome::BitmapFetcher* f); 51 explicit ImageRequest(chrome::BitmapFetcher* f);
(...skipping 23 matching lines...) Expand all
75 ImageFetcherDelegate* delegate_; 75 ImageFetcherDelegate* delegate_;
76 76
77 net::URLRequestContextGetter* url_request_context_; 77 net::URLRequestContextGetter* url_request_context_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl); 79 DISALLOW_COPY_AND_ASSIGN(ImageFetcherImpl);
80 }; 80 };
81 81
82 } // namespace suggestions 82 } // namespace suggestions
83 83
84 #endif // CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_ 84 #endif // CHROME_BROWSER_SEARCH_SUGGESTIONS_IMAGE_FETCHER_IMPL_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_avatar_downloader.cc ('k') | chrome/browser/search/suggestions/image_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698