| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // Stub user email (for test paths). | 72 // Stub user email (for test paths). |
| 73 const char kStubUser[] = "stub-user@example.com"; | 73 const char kStubUser[] = "stub-user@example.com"; |
| 74 | 74 |
| 75 // Names of nodes with info about user image. | 75 // Names of nodes with info about user image. |
| 76 const char kImagePathNodeName[] = "path"; | 76 const char kImagePathNodeName[] = "path"; |
| 77 const char kImageIndexNodeName[] = "index"; | 77 const char kImageIndexNodeName[] = "index"; |
| 78 | 78 |
| 79 // Delay betweeen user login and attempt to update user's profile image. | 79 // Delay betweeen user login and attempt to update user's profile image. |
| 80 const long kProfileImageDownloadDelayMs = 10000; | 80 const long kProfileImageDownloadDelayMs = 10000; |
| 81 | 81 |
| 82 base::LazyInstance<UserManager> g_user_manager(base::LINKER_INITIALIZED); | 82 base::LazyInstance<UserManager> g_user_manager = LINKER_ZERO_INITIALIZED; |
| 83 | 83 |
| 84 // Used to handle the asynchronous response of deleting a cryptohome directory. | 84 // Used to handle the asynchronous response of deleting a cryptohome directory. |
| 85 class RemoveAttempt : public CryptohomeLibrary::Delegate { | 85 class RemoveAttempt : public CryptohomeLibrary::Delegate { |
| 86 public: | 86 public: |
| 87 // Creates new remove attempt for the given user. Note, |delegate| can | 87 // Creates new remove attempt for the given user. Note, |delegate| can |
| 88 // be NULL. | 88 // be NULL. |
| 89 RemoveAttempt(const std::string& user_email, | 89 RemoveAttempt(const std::string& user_email, |
| 90 chromeos::RemoveUserDelegate* delegate) | 90 chromeos::RemoveUserDelegate* delegate) |
| 91 : user_email_(user_email), | 91 : user_email_(user_email), |
| 92 delegate_(delegate), | 92 delegate_(delegate), |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 | 838 |
| 839 User* UserManager::CreateUser(const std::string& email) const { | 839 User* UserManager::CreateUser(const std::string& email) const { |
| 840 User* user = new User(email); | 840 User* user = new User(email); |
| 841 user->set_oauth_token_status(GetUserOAuthStatus(email)); | 841 user->set_oauth_token_status(GetUserOAuthStatus(email)); |
| 842 // Used to determine whether user's display name is unique. | 842 // Used to determine whether user's display name is unique. |
| 843 ++display_name_count_[user->GetDisplayName()]; | 843 ++display_name_count_[user->GetDisplayName()]; |
| 844 return user; | 844 return user; |
| 845 } | 845 } |
| 846 | 846 |
| 847 } // namespace chromeos | 847 } // namespace chromeos |
| OLD | NEW |