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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 observer_list_, | 500 observer_list_, |
501 LocalStateChanged(this)); | 501 LocalStateChanged(this)); |
502 } | 502 } |
503 | 503 |
504 // Protected constructor and destructor. | 504 // Protected constructor and destructor. |
505 UserManager::UserManager() | 505 UserManager::UserManager() |
506 : ALLOW_THIS_IN_INITIALIZER_LIST(image_loader_(new UserImageLoader)), | 506 : ALLOW_THIS_IN_INITIALIZER_LIST(image_loader_(new UserImageLoader)), |
507 guest_user_(kGuestUser), | 507 guest_user_(kGuestUser), |
508 stub_user_(kStubUser), | 508 stub_user_(kStubUser), |
509 logged_in_user_(NULL), | 509 logged_in_user_(NULL), |
510 offline_login_(false), | |
511 current_user_is_owner_(false), | 510 current_user_is_owner_(false), |
512 current_user_is_new_(false), | 511 current_user_is_new_(false), |
513 user_is_logged_in_(false), | 512 user_is_logged_in_(false), |
514 last_image_set_async_(false), | 513 last_image_set_async_(false), |
515 downloaded_profile_image_data_url_(chrome::kAboutBlankURL) { | 514 downloaded_profile_image_data_url_(chrome::kAboutBlankURL) { |
516 // Use stub as the logged-in user for test paths without login. | 515 // Use stub as the logged-in user for test paths without login. |
517 if (!system::runtime_environment::IsRunningOnChromeOS()) | 516 if (!system::runtime_environment::IsRunningOnChromeOS()) |
518 StubUserLoggedIn(); | 517 StubUserLoggedIn(); |
519 registrar_.Add(this, chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED, | 518 registrar_.Add(this, chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED, |
520 content::NotificationService::AllSources()); | 519 content::NotificationService::AllSources()); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 | 856 |
858 User* UserManager::CreateUser(const std::string& email) const { | 857 User* UserManager::CreateUser(const std::string& email) const { |
859 User* user = new User(email); | 858 User* user = new User(email); |
860 user->set_oauth_token_status(GetUserOAuthStatus(email)); | 859 user->set_oauth_token_status(GetUserOAuthStatus(email)); |
861 // Used to determine whether user's display name is unique. | 860 // Used to determine whether user's display name is unique. |
862 ++display_name_count_[user->GetDisplayName()]; | 861 ++display_name_count_[user->GetDisplayName()]; |
863 return user; | 862 return user; |
864 } | 863 } |
865 | 864 |
866 } // namespace chromeos | 865 } // namespace chromeos |
OLD | NEW |