Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 host_(host), 73 host_(host),
74 num_login_attempts_(0), 74 num_login_attempts_(0),
75 user_settings_(new UserCrosSettingsProvider), 75 user_settings_(new UserCrosSettingsProvider),
76 method_factory_(this) { 76 method_factory_(this) {
77 DCHECK(current_controller_ == NULL); 77 DCHECK(current_controller_ == NULL);
78 current_controller_ = this; 78 current_controller_ = this;
79 79
80 login_display_ = host_->CreateLoginDisplay(this); 80 login_display_ = host_->CreateLoginDisplay(this);
81 81
82 registrar_.Add(this, 82 registrar_.Add(this,
83 NotificationType::LOGIN_USER_IMAGE_CHANGED, 83 chrome::LOGIN_USER_IMAGE_CHANGED,
84 NotificationService::AllSources()); 84 NotificationService::AllSources());
85 } 85 }
86 86
87 void ExistingUserController::Init(const UserVector& users) { 87 void ExistingUserController::Init(const UserVector& users) {
88 UserVector filtered_users; 88 UserVector filtered_users;
89 if (UserCrosSettingsProvider::cached_show_users_on_signin()) { 89 if (UserCrosSettingsProvider::cached_show_users_on_signin()) {
90 for (size_t i = 0; i < users.size(); ++i) 90 for (size_t i = 0; i < users.size(); ++i)
91 // TODO(xiyuan): Clean user profile whose email is not in whitelist. 91 // TODO(xiyuan): Clean user profile whose email is not in whitelist.
92 if (UserCrosSettingsProvider::cached_allow_new_user() || 92 if (UserCrosSettingsProvider::cached_allow_new_user() ||
93 UserCrosSettingsProvider::IsEmailInCachedWhitelist( 93 UserCrosSettingsProvider::IsEmailInCachedWhitelist(
(...skipping 16 matching lines...) Expand all
110 StartAutomaticFreeDiskSpaceControl(); 110 StartAutomaticFreeDiskSpaceControl();
111 } 111 }
112 112
113 //////////////////////////////////////////////////////////////////////////////// 113 ////////////////////////////////////////////////////////////////////////////////
114 // ExistingUserController, NotificationObserver implementation: 114 // ExistingUserController, NotificationObserver implementation:
115 // 115 //
116 116
117 void ExistingUserController::Observe(NotificationType type, 117 void ExistingUserController::Observe(NotificationType type,
118 const NotificationSource& source, 118 const NotificationSource& source,
119 const NotificationDetails& details) { 119 const NotificationDetails& details) {
120 if (type != NotificationType::LOGIN_USER_IMAGE_CHANGED) 120 if (type != chrome::LOGIN_USER_IMAGE_CHANGED)
121 return; 121 return;
122 122
123 UserManager::User* user = Details<UserManager::User>(details).ptr(); 123 UserManager::User* user = Details<UserManager::User>(details).ptr();
124 login_display_->OnUserImageChanged(user); 124 login_display_->OnUserImageChanged(user);
125 } 125 }
126 126
127 //////////////////////////////////////////////////////////////////////////////// 127 ////////////////////////////////////////////////////////////////////////////////
128 // ExistingUserController, private: 128 // ExistingUserController, private:
129 129
130 ExistingUserController::~ExistingUserController() { 130 ExistingUserController::~ExistingUserController() {
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 } 519 }
520 if (CrosLibrary::Get()->EnsureLoaded()) { 520 if (CrosLibrary::Get()->EnsureLoaded()) {
521 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary(); 521 CryptohomeLibrary* cryptohomed = CrosLibrary::Get()->GetCryptohomeLibrary();
522 cryptohomed->AsyncSetOwnerUser( 522 cryptohomed->AsyncSetOwnerUser(
523 UserCrosSettingsProvider::cached_owner(), NULL); 523 UserCrosSettingsProvider::cached_owner(), NULL);
524 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL); 524 cryptohomed->AsyncDoAutomaticFreeDiskSpaceControl(NULL);
525 } 525 }
526 } 526 }
527 527
528 } // namespace chromeos 528 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698