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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 explicit GAIAInfoUpdateService(Profile* profile); | 25 explicit GAIAInfoUpdateService(Profile* profile); |
26 virtual ~GAIAInfoUpdateService(); | 26 virtual ~GAIAInfoUpdateService(); |
27 | 27 |
28 // Updates the GAIA info for the profile associated with this instance. | 28 // Updates the GAIA info for the profile associated with this instance. |
29 virtual void Update(); | 29 virtual void Update(); |
30 | 30 |
31 // Checks if downloading GAIA info for the given profile is allowed. | 31 // Checks if downloading GAIA info for the given profile is allowed. |
32 static bool ShouldUseGAIAProfileInfo(Profile* profile); | 32 static bool ShouldUseGAIAProfileInfo(Profile* profile); |
33 | 33 |
34 // Register prefs for a profile. | 34 // Register prefs for a profile. |
35 static void RegisterUserPrefs(PrefService* prefs); | 35 static void RegisterUserPrefs(PrefServiceBase* prefs); |
36 | 36 |
37 // ProfileDownloaderDelegate: | 37 // ProfileDownloaderDelegate: |
38 virtual bool NeedsProfilePicture() const OVERRIDE; | 38 virtual bool NeedsProfilePicture() const OVERRIDE; |
39 virtual int GetDesiredImageSideLength() const OVERRIDE; | 39 virtual int GetDesiredImageSideLength() const OVERRIDE; |
40 virtual Profile* GetBrowserProfile() OVERRIDE; | 40 virtual Profile* GetBrowserProfile() OVERRIDE; |
41 virtual std::string GetCachedPictureURL() const OVERRIDE; | 41 virtual std::string GetCachedPictureURL() const OVERRIDE; |
42 virtual void OnProfileDownloadSuccess(ProfileDownloader* downloader) OVERRIDE; | 42 virtual void OnProfileDownloadSuccess(ProfileDownloader* downloader) OVERRIDE; |
43 virtual void OnProfileDownloadFailure(ProfileDownloader* downloader) OVERRIDE; | 43 virtual void OnProfileDownloadFailure(ProfileDownloader* downloader) OVERRIDE; |
44 | 44 |
45 private: | 45 private: |
(...skipping 11 matching lines...) Expand all Loading... |
57 Profile* profile_; | 57 Profile* profile_; |
58 scoped_ptr<ProfileDownloader> profile_image_downloader_; | 58 scoped_ptr<ProfileDownloader> profile_image_downloader_; |
59 StringPrefMember username_pref_; | 59 StringPrefMember username_pref_; |
60 base::Time last_updated_; | 60 base::Time last_updated_; |
61 base::OneShotTimer<GAIAInfoUpdateService> timer_; | 61 base::OneShotTimer<GAIAInfoUpdateService> timer_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService); | 63 DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService); |
64 }; | 64 }; |
65 | 65 |
66 #endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ | 66 #endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ |
OLD | NEW |