| 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 bool UserManager::GetShouldUseOAuthRefreshToken() { | |
| 844 return false; | |
| 845 } | |
| 846 | |
| 847 void UserManager::OnDownloadComplete(ProfileDownloader* downloader, | 843 void UserManager::OnDownloadComplete(ProfileDownloader* downloader, |
| 848 bool success) { | 844 bool success) { |
| 849 ProfileDownloadResult result; | 845 ProfileDownloadResult result; |
| 850 std::string time_histogram_name; | 846 std::string time_histogram_name; |
| 851 if (!success) { | 847 if (!success) { |
| 852 result = kDownloadFailure; | 848 result = kDownloadFailure; |
| 853 time_histogram_name = kProfileDownloadFailureTime; | 849 time_histogram_name = kProfileDownloadFailureTime; |
| 854 } else if (downloader->GetProfilePicture().isNull()) { | 850 } else if (downloader->GetProfilePicture().isNull()) { |
| 855 result = kDownloadDefault; | 851 result = kDownloadDefault; |
| 856 time_histogram_name = kProfileDownloadDefaultTime; | 852 time_histogram_name = kProfileDownloadDefaultTime; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 | 902 |
| 907 User* UserManager::CreateUser(const std::string& email) const { | 903 User* UserManager::CreateUser(const std::string& email) const { |
| 908 User* user = new User(email); | 904 User* user = new User(email); |
| 909 user->set_oauth_token_status(GetUserOAuthStatus(email)); | 905 user->set_oauth_token_status(GetUserOAuthStatus(email)); |
| 910 // Used to determine whether user's display name is unique. | 906 // Used to determine whether user's display name is unique. |
| 911 ++display_name_count_[user->GetDisplayName()]; | 907 ++display_name_count_[user->GetDisplayName()]; |
| 912 return user; | 908 return user; |
| 913 } | 909 } |
| 914 | 910 |
| 915 } // namespace chromeos | 911 } // namespace chromeos |
| OLD | NEW |