Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3869)

Unified Diff: chrome/browser/gaia_userinfo/profile_downloader_delegate.h

Issue 8510069: Make ProfileImageDownloader available to non-chromeos code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gaia_userinfo/profile_downloader_delegate.h
diff --git a/chrome/browser/gaia_userinfo/profile_downloader_delegate.h b/chrome/browser/gaia_userinfo/profile_downloader_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..ddcc52b4ce1ee4d6c1e9d286bd4d44265d23b9f4
--- /dev/null
+++ b/chrome/browser/gaia_userinfo/profile_downloader_delegate.h
@@ -0,0 +1,41 @@
+// 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_GAIA_USERINFO_PROFILE_DOWNLOADER_DELEGATE_H_
+#define CHROME_BROWSER_GAIA_USERINFO_PROFILE_DOWNLOADER_DELEGATE_H_
+#pragma once
+
+#include "base/basictypes.h"
+
+class SkBitmap;
+class Profile;
+
+// 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 desierd size of the profile image.
Ivan Korotkov 2011/11/15 11:05:08 desired If 0, returns image of the originally uplo
sail 2011/11/15 20:17:22 Fixed
Ivan Korotkov 2011/11/17 08:37:12 It is implemented by Picasa :) /s0/ in URL will re
sail 2011/11/21 22:01:00 Done.
+ virtual int GetDesiredImageSize() = 0;
+
+ // Returns the signed in user's user name.
+ virtual std::string GetProfileUserName() = 0;
Ivan Korotkov 2011/11/15 11:05:08 AFAIK this is only used to check that logged_in_us
sail 2011/11/15 20:17:22 Done.
+
+ // Returns the browser profile associated with this download request.
+ virtual Profile* GetBrowserProfile() = 0;
+
+ // Called when image is successfully downloaded and decoded.
+ virtual void OnDownloadSuccess(const string16& full_name,
Ivan Korotkov 2011/11/15 12:29:04 As discussed offline with Anton, it's a bad idea t
sail 2011/11/15 20:17:22 To simplify things I replaced the three OnDownload
+ const SkBitmap& image) = 0;
+
+ // Called on download failure.
+ virtual void OnDownloadFailure() {}
+
+ // Called when user has the default profile image and we won't download
+ // it.
+ virtual void OnDownloadDefaultImage(const string16& full_name) {}
+};
+
+#endif // CHROME_BROWSER_GAIA_USERINFO_PROFILE_DOWNLOADER_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698