| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" |
| 12 #include "chrome/browser/browser_thread.h" | 12 #include "content/browser/browser_thread.h" |
| 13 | 13 |
| 14 // We want to use NewRunnableMethod for non-static methods of this class but | 14 // We want to use NewRunnableMethod for non-static methods of this class but |
| 15 // need to disable reference counting since it is singleton. | 15 // need to disable reference counting since it is singleton. |
| 16 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::OwnershipService); | 16 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::OwnershipService); |
| 17 | 17 |
| 18 namespace chromeos { | 18 namespace chromeos { |
| 19 | 19 |
| 20 static base::LazyInstance<OwnershipService> g_ownership_service( | 20 static base::LazyInstance<OwnershipService> g_ownership_service( |
| 21 base::LINKER_INITIALIZED); | 21 base::LINKER_INITIALIZED); |
| 22 | 22 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 } | 186 } |
| 187 | 187 |
| 188 void OwnershipService::SetStatus(Status new_status) { | 188 void OwnershipService::SetStatus(Status new_status) { |
| 189 DCHECK(new_status == OWNERSHIP_TAKEN || new_status == OWNERSHIP_NONE); | 189 DCHECK(new_status == OWNERSHIP_TAKEN || new_status == OWNERSHIP_NONE); |
| 190 base::AutoLock lk(ownership_status_lock_); | 190 base::AutoLock lk(ownership_status_lock_); |
| 191 ownership_status_ = new_status; | 191 ownership_status_ = new_status; |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace chromeos | 194 } // namespace chromeos |
| 195 | 195 |
| OLD | NEW |