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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 kDownloadSuccess, | 93 kDownloadSuccess, |
94 kDownloadFailure, | 94 kDownloadFailure, |
95 kDownloadDefault, | 95 kDownloadDefault, |
96 | 96 |
97 // Must be the last, convenient count. | 97 // Must be the last, convenient count. |
98 kDownloadResultsCount | 98 kDownloadResultsCount |
99 }; | 99 }; |
100 | 100 |
101 // Time histogram name for the default profile image download. | 101 // Time histogram name for the default profile image download. |
102 const char kProfileDownloadDefaultTime[] = | 102 const char kProfileDownloadDefaultTime[] = |
103 "UserImage.ProfileDownloadDefaultTime"; | 103 "UserImage.ProfileDownloadTime.Default"; |
104 // Time histogram name for a failed profile image download. | 104 // Time histogram name for a failed profile image download. |
105 const char kProfileDownloadFailureTime[] = | 105 const char kProfileDownloadFailureTime[] = |
106 "UserImage.ProfileDownloadFailureTime"; | 106 "UserImage.ProfileDownloadTime.Failure"; |
107 // Time histogram name for a successful profile image download. | 107 // Time histogram name for a successful profile image download. |
108 const char ProfileDownloadSuccessTime[] = | 108 const char ProfileDownloadSuccessTime[] = |
109 "UserImage.ProfileDownloadSuccessTime"; | 109 "UserImage.ProfileDownloadTime.Success"; |
110 | 110 |
111 // Used to handle the asynchronous response of deleting a cryptohome directory. | 111 // Used to handle the asynchronous response of deleting a cryptohome directory. |
112 class RemoveAttempt : public CryptohomeLibrary::Delegate { | 112 class RemoveAttempt : public CryptohomeLibrary::Delegate { |
113 public: | 113 public: |
114 // Creates new remove attempt for the given user. Note, |delegate| can | 114 // Creates new remove attempt for the given user. Note, |delegate| can |
115 // be NULL. | 115 // be NULL. |
116 RemoveAttempt(const std::string& user_email, | 116 RemoveAttempt(const std::string& user_email, |
117 chromeos::RemoveUserDelegate* delegate) | 117 chromeos::RemoveUserDelegate* delegate) |
118 : user_email_(user_email), | 118 : user_email_(user_email), |
119 delegate_(delegate), | 119 delegate_(delegate), |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 | 900 |
901 User* UserManager::CreateUser(const std::string& email) const { | 901 User* UserManager::CreateUser(const std::string& email) const { |
902 User* user = new User(email); | 902 User* user = new User(email); |
903 user->set_oauth_token_status(GetUserOAuthStatus(email)); | 903 user->set_oauth_token_status(GetUserOAuthStatus(email)); |
904 // Used to determine whether user's display name is unique. | 904 // Used to determine whether user's display name is unique. |
905 ++display_name_count_[user->GetDisplayName()]; | 905 ++display_name_count_[user->GetDisplayName()]; |
906 return user; | 906 return user; |
907 } | 907 } |
908 | 908 |
909 } // namespace chromeos | 909 } // namespace chromeos |
OLD | NEW |