| 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/ownership_service.h" | 5 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/common/chrome_notification_types.h" | 14 #include "chrome/common/chrome_notification_types.h" |
| 15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 16 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
| 17 | 17 |
| 18 using content::BrowserThread; |
| 19 |
| 18 namespace chromeos { | 20 namespace chromeos { |
| 19 | 21 |
| 20 static base::LazyInstance<OwnershipService> g_ownership_service( | 22 static base::LazyInstance<OwnershipService> g_ownership_service( |
| 21 base::LINKER_INITIALIZED); | 23 base::LINKER_INITIALIZED); |
| 22 | 24 |
| 23 // static | 25 // static |
| 24 OwnershipService* OwnershipService::GetSharedInstance() { | 26 OwnershipService* OwnershipService::GetSharedInstance() { |
| 25 return g_ownership_service.Pointer(); | 27 return g_ownership_service.Pointer(); |
| 26 } | 28 } |
| 27 | 29 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 SetStatus(status); | 220 SetStatus(status); |
| 219 } | 221 } |
| 220 | 222 |
| 221 void OwnershipService::SetStatus(Status new_status) { | 223 void OwnershipService::SetStatus(Status new_status) { |
| 222 DCHECK(new_status == OWNERSHIP_TAKEN || new_status == OWNERSHIP_NONE); | 224 DCHECK(new_status == OWNERSHIP_TAKEN || new_status == OWNERSHIP_NONE); |
| 223 base::AutoLock lk(ownership_status_lock_); | 225 base::AutoLock lk(ownership_status_lock_); |
| 224 ownership_status_ = new_status; | 226 ownership_status_ = new_status; |
| 225 } | 227 } |
| 226 | 228 |
| 227 } // namespace chromeos | 229 } // namespace chromeos |
| OLD | NEW |