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

Side by Side Diff: chrome/browser/supervised_user/legacy/custodian_profile_downloader_service.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 2014 The Chromium Authors. All rights reserved. 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 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_SUPERVISED_USER_LEGACY_CUSTODIAN_PROFILE_DOWNLOADER_SERVI CE_H_ 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_LEGACY_CUSTODIAN_PROFILE_DOWNLOADER_SERVI CE_H_
6 #define CHROME_BROWSER_SUPERVISED_USER_LEGACY_CUSTODIAN_PROFILE_DOWNLOADER_SERVI CE_H_ 6 #define CHROME_BROWSER_SUPERVISED_USER_LEGACY_CUSTODIAN_PROFILE_DOWNLOADER_SERVI CE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "chrome/browser/profiles/profile_downloader.h" 9 #include "chrome/browser/profiles/profile_downloader.h"
10 #include "chrome/browser/profiles/profile_downloader_delegate.h" 10 #include "chrome/browser/profiles/profile_downloader_delegate.h"
(...skipping 14 matching lines...) Expand all
25 25
26 // Downloads the GAIA account information for the |custodian_profile_|. 26 // Downloads the GAIA account information for the |custodian_profile_|.
27 // This is a best-effort attempt with no error reporting nor timeout. 27 // This is a best-effort attempt with no error reporting nor timeout.
28 // If the download is successful, the profile's full (display) name will 28 // If the download is successful, the profile's full (display) name will
29 // be returned via the callback. If the download fails or never completes, 29 // be returned via the callback. If the download fails or never completes,
30 // the callback will not be called. 30 // the callback will not be called.
31 void DownloadProfile(const DownloadProfileCallback& callback); 31 void DownloadProfile(const DownloadProfileCallback& callback);
32 32
33 // ProfileDownloaderDelegate: 33 // ProfileDownloaderDelegate:
34 bool NeedsProfilePicture() const override; 34 bool NeedsProfilePicture() const override;
35 int GetDesiredImageSideLength() const override; 35 unsigned int GetDesiredImageSideLength() const override;
Marc Treib 2016/01/11 09:23:05 Using "unsigned" to mean "this will never be negat
anthonyvd 2016/01/11 17:05:35 I took this to be a case where the value we're ret
Marc Treib 2016/01/11 17:27:28 Aaand now you don't need my LGTM anymore ;)
36 std::string GetCachedPictureURL() const override; 36 std::string GetCachedPictureURL() const override;
37 Profile* GetBrowserProfile() override; 37 Profile* GetBrowserProfile() override;
38 bool IsPreSignin() const override; 38 bool IsPreSignin() const override;
39 void OnProfileDownloadSuccess(ProfileDownloader* downloader) override; 39 void OnProfileDownloadSuccess(ProfileDownloader* downloader) override;
40 void OnProfileDownloadFailure( 40 void OnProfileDownloadFailure(
41 ProfileDownloader* downloader, 41 ProfileDownloader* downloader,
42 ProfileDownloaderDelegate::FailureReason reason) override; 42 ProfileDownloaderDelegate::FailureReason reason) override;
43 43
44 private: 44 private:
45 friend class CustodianProfileDownloaderServiceFactory; 45 friend class CustodianProfileDownloaderServiceFactory;
46 // Use |CustodianProfileDownloaderServiceFactory::GetForProfile(...)| to 46 // Use |CustodianProfileDownloaderServiceFactory::GetForProfile(...)| to
47 // get instances of this service. 47 // get instances of this service.
48 explicit CustodianProfileDownloaderService(Profile* custodian_profile); 48 explicit CustodianProfileDownloaderService(Profile* custodian_profile);
49 49
50 scoped_ptr<ProfileDownloader> profile_downloader_; 50 scoped_ptr<ProfileDownloader> profile_downloader_;
51 DownloadProfileCallback download_callback_; 51 DownloadProfileCallback download_callback_;
52 52
53 // Owns us via the KeyedService mechanism. 53 // Owns us via the KeyedService mechanism.
54 Profile* custodian_profile_; 54 Profile* custodian_profile_;
55 55
56 std::string last_downloaded_profile_email_; 56 std::string last_downloaded_profile_email_;
57 std::string in_progress_profile_email_; 57 std::string in_progress_profile_email_;
58 }; 58 };
59 59
60 #endif // CHROME_BROWSER_SUPERVISED_USER_LEGACY_CUSTODIAN_PROFILE_DOWNLOADER_SE RVICE_H_ 60 #endif // CHROME_BROWSER_SUPERVISED_USER_LEGACY_CUSTODIAN_PROFILE_DOWNLOADER_SE RVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698