| 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/signed_settings_helper.h" | 5 #include "chrome/browser/chromeos/login/signed_settings_helper.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 void AddOpContext(OpContext* context); | 324 void AddOpContext(OpContext* context); |
| 325 void ClearAll(); | 325 void ClearAll(); |
| 326 | 326 |
| 327 std::vector<OpContext*> pending_contexts_; | 327 std::vector<OpContext*> pending_contexts_; |
| 328 | 328 |
| 329 friend struct base::DefaultLazyInstanceTraits<SignedSettingsHelperImpl>; | 329 friend struct base::DefaultLazyInstanceTraits<SignedSettingsHelperImpl>; |
| 330 DISALLOW_COPY_AND_ASSIGN(SignedSettingsHelperImpl); | 330 DISALLOW_COPY_AND_ASSIGN(SignedSettingsHelperImpl); |
| 331 }; | 331 }; |
| 332 | 332 |
| 333 static base::LazyInstance<SignedSettingsHelperImpl> | 333 static base::LazyInstance<SignedSettingsHelperImpl> |
| 334 g_signed_settings_helper_impl(base::LINKER_INITIALIZED); | 334 g_signed_settings_helper_impl = LINKER_ZERO_INITIALIZED; |
| 335 | 335 |
| 336 SignedSettingsHelperImpl::SignedSettingsHelperImpl() { | 336 SignedSettingsHelperImpl::SignedSettingsHelperImpl() { |
| 337 } | 337 } |
| 338 | 338 |
| 339 SignedSettingsHelperImpl::~SignedSettingsHelperImpl() { | 339 SignedSettingsHelperImpl::~SignedSettingsHelperImpl() { |
| 340 if (!pending_contexts_.empty()) { | 340 if (!pending_contexts_.empty()) { |
| 341 LOG(WARNING) << "SignedSettingsHelperImpl shutdown with pending ops, " | 341 LOG(WARNING) << "SignedSettingsHelperImpl shutdown with pending ops, " |
| 342 << "changes will be lost."; | 342 << "changes will be lost."; |
| 343 ClearAll(); | 343 ClearAll(); |
| 344 } | 344 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 | 446 |
| 447 if (test_delegate_) | 447 if (test_delegate_) |
| 448 test_delegate_->OnOpCompleted(context->op()); | 448 test_delegate_->OnOpCompleted(context->op()); |
| 449 } | 449 } |
| 450 | 450 |
| 451 SignedSettingsHelper* SignedSettingsHelper::Get() { | 451 SignedSettingsHelper* SignedSettingsHelper::Get() { |
| 452 return g_signed_settings_helper_impl.Pointer(); | 452 return g_signed_settings_helper_impl.Pointer(); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace chromeos | 455 } // namespace chromeos |
| OLD | NEW |