Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / profiles / profile_avatar_downloader.h
blob43b357862a90b9ba036adea5d5c251dd83262fe5
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 "base/files/file_path.h"
8 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h"
10 class ProfileInfoCache;
12 class ProfileAvatarDownloader : public chrome::BitmapFetcherDelegate {
13 public:
14 ProfileAvatarDownloader(size_t icon_index,
15 const base::FilePath& profile_path,
16 ProfileInfoCache* cache);
17 ~ProfileAvatarDownloader() override;
19 void Start();
21 // BitmapFetcherDelegate:
22 void OnFetchComplete(const GURL& url, const SkBitmap* bitmap) override;
24 private:
25 // Downloads the avatar image from a url.
26 scoped_ptr<chrome::BitmapFetcher> fetcher_;
28 // Index of the avatar being downloaded.
29 size_t icon_index_;
31 // Path of the profile for which the avatar is being downloaded.
32 base::FilePath profile_path_;
34 ProfileInfoCache* cache_; // Weak.
37 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_DOWNLOADER_H_