Revert 168224 - Update V8 to version 3.15.4.
[chromium-blink-merge.git] / chrome / browser / profiles / profile_downloader_delegate.h
blob4b6e19c70dabc5e1dc8a4629dee8e0e7672becd0
1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/string16.h"
13 class Profile;
14 class ProfileDownloader;
16 // Reports on success or failure of Profile download. It is OK to delete the
17 // |ProfileImageDownloader| instance in any of these handlers.
18 class ProfileDownloaderDelegate {
19 public:
20 virtual ~ProfileDownloaderDelegate() {}
22 // Whether the delegate need profile picture to be downloaded.
23 virtual bool NeedsProfilePicture() const = 0;
25 // Returns the desired side length of the profile image. If 0, returns image
26 // of the originally uploaded size.
27 virtual int GetDesiredImageSideLength() const = 0;
29 // Returns the cached URL. If the cache URL matches the new image URL
30 // the image will not be downloaded. Return an empty string when there is no
31 // cached URL.
32 virtual std::string GetCachedPictureURL() const = 0;
34 // Returns the browser profile associated with this download request.
35 virtual Profile* GetBrowserProfile() = 0;
37 // Called when the profile download has completed successfully. Delegate can
38 // query the downloader for the picture and full name.
39 virtual void OnProfileDownloadSuccess(ProfileDownloader* downloader) = 0;
41 // Called when the profile download has failed.
42 virtual void OnProfileDownloadFailure(ProfileDownloader* downloader) = 0;
45 #endif // CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_