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

Side by Side Diff: chrome/browser/profiles/profile_avatar_downloader.h

Issue 222313005: [Profiles] Download high-res avatars using the --new-profile-management flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 #ifndef CHROME_BROWSER_PROFILES_PROFILE_AVATAR_DOWNLOADER_H_
5 #define CHROME_BROWSER_PROFILES_PROFILE_AVATAR_DOWNLOADER_H_
6
7 #include "chrome/browser/bitmap_fetcher.h"
8 #include "net/url_request/url_request_context_getter.h"
9
10 namespace net {
11 class URLRequestContextGetter;
12 }
13
14 class ProfileInfoCache;
15
16 class ProfileAvatarDownloader : public chrome::BitmapFetcherDelegate {
17 public:
18 ProfileAvatarDownloader(net::URLRequestContextGetter* request_context,
19 size_t icon_index,
20 ProfileInfoCache* cache);
21
22 virtual ~ProfileAvatarDownloader();
23
24 void Start();
25
26 // BitmapFetcherDelegate:
27 virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) OVERRIDE;
28
29 private:
30 // Downloads the avatar image from a url.
31 scoped_ptr<chrome::BitmapFetcher> fetcher_;
32
33 // Needed by the BitmapFetcher to instantiate a URL fetcher.
34 net::URLRequestContextGetter* request_context_;
35
36 // Index of the avatar being downloaded.
37 size_t icon_index_;
38
39 ProfileInfoCache* cache_; // Weak.
40 };
41
42 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_DOWNLOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698