diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 03:56:09 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 03:56:09 +0000 |
commit | 6d33da172efea858a707202dc89eb3b04c7d0638 (patch) | |
tree | 0e0c6b7f9ba8e7a2a4c22f570eb961dca89126ed /chrome/browser/profiles/profile_downloader_delegate.h | |
parent | 0de5d8609abf9961228c2a12031fc5354688345a (diff) | |
download | chromium_src-6d33da172efea858a707202dc89eb3b04c7d0638.zip chromium_src-6d33da172efea858a707202dc89eb3b04c7d0638.tar.gz chromium_src-6d33da172efea858a707202dc89eb3b04c7d0638.tar.bz2 |
Make ProfileImageDownloader available to non-chromeos code
BUG=91241
TEST=
Review URL: http://codereview.chromium.org/8510069
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles/profile_downloader_delegate.h')
-rw-r--r-- | chrome/browser/profiles/profile_downloader_delegate.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome/browser/profiles/profile_downloader_delegate.h b/chrome/browser/profiles/profile_downloader_delegate.h new file mode 100644 index 0000000..2a71a19 --- /dev/null +++ b/chrome/browser/profiles/profile_downloader_delegate.h @@ -0,0 +1,36 @@ +// Copyright (c) 2011 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_DOWNLOADER_DELEGATE_H_ +#define CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_ +#pragma once + +#include <string> + +#include "base/basictypes.h" +#include "base/string16.h" + +class Profile; +class ProfileDownloader; + +// Reports on success or failure of Profile download. It is OK to delete the +// |ProfileImageDownloader| instance in any of these handlers. +class ProfileDownloaderDelegate { + public: + virtual ~ProfileDownloaderDelegate() {} + + // Returns the desired side length of the profile image. If 0, returns image + // of the originally uploaded size. + virtual int GetDesiredImageSideLength() = 0; + + // Returns the browser profile associated with this download request. + virtual Profile* GetBrowserProfile() = 0; + + // Called when the download is complete. On success delegate should query + // the downloader for values. + virtual void OnDownloadComplete(ProfileDownloader* downloader, + bool success) = 0; +}; + +#endif // CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_ |