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

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

Issue 8742009: Cache GAIA profile picture URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 18 matching lines...) Expand all
29 // Updates the GAIA info for the profile associated with this instance. 29 // Updates the GAIA info for the profile associated with this instance.
30 virtual void Update(); 30 virtual void Update();
31 31
32 // Checks if downloading GAIA info for the given profile is allowed. 32 // Checks if downloading GAIA info for the given profile is allowed.
33 static bool ShouldUseGAIAProfileInfo(Profile* profile); 33 static bool ShouldUseGAIAProfileInfo(Profile* profile);
34 34
35 // Register prefs for a profile. 35 // Register prefs for a profile.
36 static void RegisterUserPrefs(PrefService* prefs); 36 static void RegisterUserPrefs(PrefService* prefs);
37 37
38 // ProfileDownloaderDelegate: 38 // ProfileDownloaderDelegate:
39 virtual int GetDesiredImageSideLength() OVERRIDE; 39 virtual int GetDesiredImageSideLength() const OVERRIDE;
40 virtual Profile* GetBrowserProfile() OVERRIDE; 40 virtual Profile* GetBrowserProfile() OVERRIDE;
41 virtual bool ShouldUseOAuthRefreshToken() OVERRIDE; 41 virtual bool ShouldUseOAuthRefreshToken() const OVERRIDE;
42 virtual std::string GetCachedPictureURL() const OVERRIDE;
42 virtual void OnDownloadComplete(ProfileDownloader* downloader, 43 virtual void OnDownloadComplete(ProfileDownloader* downloader,
43 bool success) OVERRIDE; 44 bool success) OVERRIDE;
44 45
45 private: 46 private:
46 FRIEND_TEST_ALL_PREFIXES(GAIAInfoUpdateServiceTest, ScheduleUpdate); 47 FRIEND_TEST_ALL_PREFIXES(GAIAInfoUpdateServiceTest, ScheduleUpdate);
47 48
48 // content::NotificationObserver: 49 // content::NotificationObserver:
49 virtual void Observe(int type, 50 virtual void Observe(int type,
50 const content::NotificationSource& source, 51 const content::NotificationSource& source,
51 const content::NotificationDetails& details) OVERRIDE; 52 const content::NotificationDetails& details) OVERRIDE;
52 53
53 54
54 void OnUsernameChanged(); 55 void OnUsernameChanged();
55 void ScheduleNextUpdate(); 56 void ScheduleNextUpdate();
56 57
57 Profile* profile_; 58 Profile* profile_;
58 scoped_ptr<ProfileDownloader> profile_image_downloader_; 59 scoped_ptr<ProfileDownloader> profile_image_downloader_;
59 StringPrefMember username_pref_; 60 StringPrefMember username_pref_;
60 base::Time last_updated_; 61 base::Time last_updated_;
61 base::OneShotTimer<GAIAInfoUpdateService> timer_; 62 base::OneShotTimer<GAIAInfoUpdateService> timer_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService); 64 DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService);
64 }; 65 };
65 66
66 #endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ 67 #endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.cc ('k') | chrome/browser/profiles/gaia_info_update_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698