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

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

Issue 6821075: Chrome-side lockbox bindings (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed empty changes. Created 9 years, 8 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) 2010 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/ownership_service.h" 5 #include "chrome/browser/chromeos/login/ownership_service.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 d->OnKeyOpComplete(OwnerManager::KEY_UNAVAILABLE, std::vector<uint8>()); 180 d->OnKeyOpComplete(OwnerManager::KEY_UNAVAILABLE, std::vector<uint8>());
181 } 181 }
182 182
183 void OwnershipService::FetchStatus() { 183 void OwnershipService::FetchStatus() {
184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
185 Status status = IsAlreadyOwned() ? OWNERSHIP_TAKEN : OWNERSHIP_NONE; 185 Status status = IsAlreadyOwned() ? OWNERSHIP_TAKEN : OWNERSHIP_NONE;
186 SetStatus(status); 186 SetStatus(status);
187 } 187 }
188 188
189 void OwnershipService::SetStatus(Status new_status) { 189 void OwnershipService::SetStatus(Status new_status) {
190 DCHECK(new_status == OWNERSHIP_TAKEN || new_status == OWNERSHIP_NONE); 190 DCHECK(new_status != OWNERSHIP_UNKNOWN);
Chris Masone 2011/04/15 17:52:29 Please revert this check to what it was before you
pastarmovj 2011/04/15 18:44:49 Done.
191 base::AutoLock lk(ownership_status_lock_); 191 base::AutoLock lk(ownership_status_lock_);
192 ownership_status_ = new_status; 192 ownership_status_ = new_status;
193 } 193 }
194 194
195 } // namespace chromeos 195 } // namespace chromeos
196 196
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698