Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / profiles / profile_avatar_downloader.h
blob67450ecee9213dedf2452448a343d69fce8c8292
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_
7 #include "chrome/browser/bitmap_fetcher.h"
9 class ProfileInfoCache;
11 class ProfileAvatarDownloader : public chrome::BitmapFetcherDelegate {
12 public:
13 ProfileAvatarDownloader(size_t icon_index, ProfileInfoCache* cache);
14 virtual ~ProfileAvatarDownloader();
16 void Start();
18 // BitmapFetcherDelegate:
19 virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) OVERRIDE;
21 private:
22 // Downloads the avatar image from a url.
23 scoped_ptr<chrome::BitmapFetcher> fetcher_;
25 // Index of the avatar being downloaded.
26 size_t icon_index_;
28 ProfileInfoCache* cache_; // Weak.
31 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_DOWNLOADER_H_