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