Chromium Code Reviews| Index: chrome/browser/profiles/profile_avatar_downloader.h |
| diff --git a/chrome/browser/profiles/profile_avatar_downloader.h b/chrome/browser/profiles/profile_avatar_downloader.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0ef324356f61e7c4327b92fedd5eb18f1a6db6c8 |
| --- /dev/null |
| +++ b/chrome/browser/profiles/profile_avatar_downloader.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +#ifndef CHROME_BROWSER_PROFILES_PROFILE_AVATAR_DOWNLOADER_H_ |
| +#define CHROME_BROWSER_PROFILES_PROFILE_AVATAR_DOWNLOADER_H_ |
| + |
| +#include "chrome/browser/bitmap_fetcher.h" |
| + |
| +class ProfileInfoCache; |
| + |
| +class ProfileAvatarDownloader : public chrome::BitmapFetcherDelegate { |
| + public: |
| + ProfileAvatarDownloader(size_t icon_index, |
| + ProfileInfoCache* cache); |
|
msw
2014/04/29 20:11:44
nit: move to the line above.
noms (inactive)
2014/04/29 20:29:10
Done.
|
| + |
|
msw
2014/04/29 20:11:44
nit: remove blank line
noms (inactive)
2014/04/29 20:29:10
Done.
|
| + virtual ~ProfileAvatarDownloader(); |
| + |
| + void Start(); |
| + |
| + // BitmapFetcherDelegate: |
| + virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) OVERRIDE; |
| + |
| + private: |
| + // Downloads the avatar image from a url. |
| + scoped_ptr<chrome::BitmapFetcher> fetcher_; |
| + |
| + // Index of the avatar being downloaded. |
| + size_t icon_index_; |
| + |
| + ProfileInfoCache* cache_; // Weak. |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_DOWNLOADER_H_ |