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

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

Issue 9355059: Renaming virtual setters/getters in UserManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: year Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ownership_service.h" 5 #include "chrome/browser/chromeos/login/ownership_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 const content::NotificationSource& source, 136 const content::NotificationSource& source,
137 const content::NotificationDetails& details) { 137 const content::NotificationDetails& details) {
138 if (type == chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) { 138 if (type == chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED) {
139 SetStatus(OWNERSHIP_TAKEN); 139 SetStatus(OWNERSHIP_TAKEN);
140 notification_registrar_.RemoveAll(); 140 notification_registrar_.RemoveAll();
141 } else { 141 } else {
142 NOTREACHED(); 142 NOTREACHED();
143 } 143 }
144 } 144 }
145 145
146 bool OwnershipService::CurrentUserIsOwner() { 146 bool OwnershipService::IsCurrentUserOwner() {
147 if (force_ownership_) 147 if (force_ownership_)
148 return true; 148 return true;
149 // If this user has the private key associated with the owner's 149 // If this user has the private key associated with the owner's
150 // public key, this user is the owner. 150 // public key, this user is the owner.
151 return IsAlreadyOwned() && manager_->EnsurePrivateKey(); 151 return IsAlreadyOwned() && manager_->EnsurePrivateKey();
152 } 152 }
153 153
154 // static 154 // static
155 void OwnershipService::UpdateOwnerKey(OwnershipService* service, 155 void OwnershipService::UpdateOwnerKey(OwnershipService* service,
156 const BrowserThread::ID thread_id, 156 const BrowserThread::ID thread_id,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 SetStatus(status); 214 SetStatus(status);
215 } 215 }
216 216
217 void OwnershipService::SetStatus(Status new_status) { 217 void OwnershipService::SetStatus(Status new_status) {
218 DCHECK(new_status == OWNERSHIP_TAKEN || new_status == OWNERSHIP_NONE); 218 DCHECK(new_status == OWNERSHIP_TAKEN || new_status == OWNERSHIP_NONE);
219 base::AutoLock lk(ownership_status_lock_); 219 base::AutoLock lk(ownership_status_lock_);
220 ownership_status_ = new_status; 220 ownership_status_ = new_status;
221 } 221 }
222 222
223 } // namespace chromeos 223 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ownership_service.h ('k') | chrome/browser/chromeos/login/ownership_status_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698