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

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

Issue 8742008: ChromeOS: Use OAuth2 refresh token to download GAIA info (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 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 20 matching lines...) Expand all
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() const OVERRIDE; 39 virtual int GetDesiredImageSideLength() const OVERRIDE;
40 virtual Profile* GetBrowserProfile() OVERRIDE; 40 virtual Profile* GetBrowserProfile() OVERRIDE;
41 virtual bool ShouldUseOAuthRefreshToken() const OVERRIDE;
42 virtual std::string GetCachedPictureURL() const OVERRIDE; 41 virtual std::string GetCachedPictureURL() const OVERRIDE;
43 virtual void OnDownloadComplete(ProfileDownloader* downloader, 42 virtual void OnDownloadComplete(ProfileDownloader* downloader,
44 bool success) OVERRIDE; 43 bool success) OVERRIDE;
45 44
46 private: 45 private:
47 FRIEND_TEST_ALL_PREFIXES(GAIAInfoUpdateServiceTest, ScheduleUpdate); 46 FRIEND_TEST_ALL_PREFIXES(GAIAInfoUpdateServiceTest, ScheduleUpdate);
48 47
49 // content::NotificationObserver: 48 // content::NotificationObserver:
50 virtual void Observe(int type, 49 virtual void Observe(int type,
51 const content::NotificationSource& source, 50 const content::NotificationSource& source,
52 const content::NotificationDetails& details) OVERRIDE; 51 const content::NotificationDetails& details) OVERRIDE;
53 52
54 53
55 void OnUsernameChanged(); 54 void OnUsernameChanged();
56 void ScheduleNextUpdate(); 55 void ScheduleNextUpdate();
57 56
58 Profile* profile_; 57 Profile* profile_;
59 scoped_ptr<ProfileDownloader> profile_image_downloader_; 58 scoped_ptr<ProfileDownloader> profile_image_downloader_;
60 StringPrefMember username_pref_; 59 StringPrefMember username_pref_;
61 base::Time last_updated_; 60 base::Time last_updated_;
62 base::OneShotTimer<GAIAInfoUpdateService> timer_; 61 base::OneShotTimer<GAIAInfoUpdateService> timer_;
63 62
64 DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService); 63 DISALLOW_COPY_AND_ASSIGN(GAIAInfoUpdateService);
65 }; 64 };
66 65
67 #endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_ 66 #endif // CHROME_BROWSER_PROFILES_GAIA_INFO_UPDATE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/gaia/token_service.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