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

Side by Side Diff: chrome/browser/profiles/profile_downloader_delegate.h

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and use Polymer where relevant. Created 4 years, 11 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 13 matching lines...) Expand all
24 IMAGE_DECODE_FAILED // Cannot decode fetched image. 24 IMAGE_DECODE_FAILED // Cannot decode fetched image.
25 }; 25 };
26 26
27 virtual ~ProfileDownloaderDelegate() {} 27 virtual ~ProfileDownloaderDelegate() {}
28 28
29 // Whether the delegate need profile picture to be downloaded. 29 // Whether the delegate need profile picture to be downloaded.
30 virtual bool NeedsProfilePicture() const = 0; 30 virtual bool NeedsProfilePicture() const = 0;
31 31
32 // Returns the desired side length of the profile image. If 0, returns image 32 // Returns the desired side length of the profile image. If 0, returns image
33 // of the originally uploaded size. 33 // of the originally uploaded size.
34 virtual int GetDesiredImageSideLength() const = 0; 34 virtual unsigned int GetDesiredImageSideLength() const = 0;
35 35
36 // Returns the cached URL. If the cache URL matches the new image URL 36 // Returns the cached URL. If the cache URL matches the new image URL
37 // the image will not be downloaded. Return an empty string when there is no 37 // the image will not be downloaded. Return an empty string when there is no
38 // cached URL. 38 // cached URL.
39 virtual std::string GetCachedPictureURL() const = 0; 39 virtual std::string GetCachedPictureURL() const = 0;
40 40
41 // Returns the browser profile associated with this download request. 41 // Returns the browser profile associated with this download request.
42 virtual Profile* GetBrowserProfile() = 0; 42 virtual Profile* GetBrowserProfile() = 0;
43 43
44 // Returns true if the profile download is taking place before the user has 44 // Returns true if the profile download is taking place before the user has
45 // signed in. This can happen for example on Android and will trigger some 45 // signed in. This can happen for example on Android and will trigger some
46 // additional fetches since some information is not yet available. 46 // additional fetches since some information is not yet available.
47 virtual bool IsPreSignin() const = 0; 47 virtual bool IsPreSignin() const = 0;
48 48
49 // Called when the profile download has completed successfully. Delegate can 49 // Called when the profile download has completed successfully. Delegate can
50 // query the downloader for the picture and full name. 50 // query the downloader for the picture and full name.
51 virtual void OnProfileDownloadSuccess(ProfileDownloader* downloader) = 0; 51 virtual void OnProfileDownloadSuccess(ProfileDownloader* downloader) = 0;
52 52
53 // Called when the profile download has failed. 53 // Called when the profile download has failed.
54 virtual void OnProfileDownloadFailure( 54 virtual void OnProfileDownloadFailure(
55 ProfileDownloader* downloader, 55 ProfileDownloader* downloader,
56 ProfileDownloaderDelegate::FailureReason reason) = 0; 56 ProfileDownloaderDelegate::FailureReason reason) = 0;
57 }; 57 };
58 58
59 #endif // CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_ 59 #endif // CHROME_BROWSER_PROFILES_PROFILE_DOWNLOADER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698