OLD | NEW |
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_GAIA_INFO_UPDATE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ |
6 #define CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ | 6 #define CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 ~GAIAInfoUpdateService() override; | 28 ~GAIAInfoUpdateService() override; |
29 | 29 |
30 // Updates the GAIA info for the profile associated with this instance. | 30 // Updates the GAIA info for the profile associated with this instance. |
31 virtual void Update(); | 31 virtual void Update(); |
32 | 32 |
33 // Checks if downloading GAIA info for the given profile is allowed. | 33 // Checks if downloading GAIA info for the given profile is allowed. |
34 static bool ShouldUseGAIAProfileInfo(Profile* profile); | 34 static bool ShouldUseGAIAProfileInfo(Profile* profile); |
35 | 35 |
36 // ProfileDownloaderDelegate: | 36 // ProfileDownloaderDelegate: |
37 bool NeedsProfilePicture() const override; | 37 bool NeedsProfilePicture() const override; |
38 int GetDesiredImageSideLength() const override; | 38 unsigned int GetDesiredImageSideLength() const override; |
39 Profile* GetBrowserProfile() override; | 39 Profile* GetBrowserProfile() override; |
40 std::string GetCachedPictureURL() const override; | 40 std::string GetCachedPictureURL() const override; |
41 bool IsPreSignin() const override; | 41 bool IsPreSignin() const override; |
42 void OnProfileDownloadSuccess(ProfileDownloader* downloader) override; | 42 void OnProfileDownloadSuccess(ProfileDownloader* downloader) override; |
43 void OnProfileDownloadFailure( | 43 void OnProfileDownloadFailure( |
44 ProfileDownloader* downloader, | 44 ProfileDownloader* downloader, |
45 ProfileDownloaderDelegate::FailureReason reason) override; | 45 ProfileDownloaderDelegate::FailureReason reason) override; |
46 | 46 |
47 // Overridden from KeyedService: | 47 // Overridden from KeyedService: |
48 void Shutdown() override; | 48 void Shutdown() override; |
(...skipping 13 matching lines...) Expand all Loading... |
62 | 62 |
63 Profile* profile_; | 63 Profile* profile_; |
64 scoped_ptr<ProfileDownloader> profile_image_downloader_; | 64 scoped_ptr<ProfileDownloader> profile_image_downloader_; |
65 base::Time last_updated_; | 65 base::Time last_updated_; |
66 base::OneShotTimer timer_; | 66 base::OneShotTimer timer_; |
67 | 67 |
68 DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService); | 68 DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService); |
69 }; | 69 }; |
70 | 70 |
71 #endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ | 71 #endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ |
OLD | NEW |