Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #include "chrome/browser/chromeos/login/user_manager.h" | 5 #include "chrome/browser/chromeos/login/user_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 833 } | 833 } |
| 834 | 834 |
| 835 int UserManager::GetDesiredImageSideLength() { | 835 int UserManager::GetDesiredImageSideLength() { |
| 836 return login::kUserImageSize; | 836 return login::kUserImageSize; |
| 837 } | 837 } |
| 838 | 838 |
| 839 Profile* UserManager::GetBrowserProfile() { | 839 Profile* UserManager::GetBrowserProfile() { |
| 840 return ProfileManager::GetDefaultProfile(); | 840 return ProfileManager::GetDefaultProfile(); |
| 841 } | 841 } |
| 842 | 842 |
| 843 std::string UserManager::GetCachedPictureURL() { | |
| 844 // Currently the profile picture URL is not cached on ChromeOS. | |
|
Ivan Korotkov
2011/11/30 14:35:44
Please file a bug to me as soon as you submit this
sail
2011/11/30 19:00:23
Done.
Looks like nkostylev has filed bug 23579 to
| |
| 845 return std::string(); | |
| 846 } | |
| 847 | |
| 843 void UserManager::OnDownloadComplete(ProfileDownloader* downloader, | 848 void UserManager::OnDownloadComplete(ProfileDownloader* downloader, |
| 844 bool success) { | 849 bool success) { |
| 845 ProfileDownloadResult result; | 850 ProfileDownloadResult result; |
| 846 std::string time_histogram_name; | 851 std::string time_histogram_name; |
| 847 if (!success) { | 852 if (!success) { |
| 848 result = kDownloadFailure; | 853 result = kDownloadFailure; |
| 849 time_histogram_name = kProfileDownloadFailureTime; | 854 time_histogram_name = kProfileDownloadFailureTime; |
| 850 } else if (downloader->GetProfilePicture().isNull()) { | 855 } else if (downloader->GetProfilePicture().isNull()) { |
| 851 result = kDownloadDefault; | 856 result = kDownloadDefault; |
| 852 time_histogram_name = kProfileDownloadDefaultTime; | 857 time_histogram_name = kProfileDownloadDefaultTime; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 902 | 907 |
| 903 User* UserManager::CreateUser(const std::string& email) const { | 908 User* UserManager::CreateUser(const std::string& email) const { |
| 904 User* user = new User(email); | 909 User* user = new User(email); |
| 905 user->set_oauth_token_status(GetUserOAuthStatus(email)); | 910 user->set_oauth_token_status(GetUserOAuthStatus(email)); |
| 906 // Used to determine whether user's display name is unique. | 911 // Used to determine whether user's display name is unique. |
| 907 ++display_name_count_[user->GetDisplayName()]; | 912 ++display_name_count_[user->GetDisplayName()]; |
| 908 return user; | 913 return user; |
| 909 } | 914 } |
| 910 | 915 |
| 911 } // namespace chromeos | 916 } // namespace chromeos |
| OLD | NEW |