OLD | NEW |
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/settings/device_settings_service.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.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/logging.h" | 10 #include "base/logging.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 session_manager_client_->AddObserver(this); | 78 session_manager_client_->AddObserver(this); |
79 | 79 |
80 StartNextOperation(); | 80 StartNextOperation(); |
81 } | 81 } |
82 | 82 |
83 void DeviceSettingsService::Shutdown() { | 83 void DeviceSettingsService::Shutdown() { |
84 STLDeleteContainerPointers(pending_operations_.begin(), | 84 STLDeleteContainerPointers(pending_operations_.begin(), |
85 pending_operations_.end()); | 85 pending_operations_.end()); |
86 pending_operations_.clear(); | 86 pending_operations_.clear(); |
87 | 87 |
88 if (session_manager_client_) | 88 session_manager_client_->RemoveObserver(this); |
89 session_manager_client_->RemoveObserver(this); | |
90 session_manager_client_ = NULL; | 89 session_manager_client_ = NULL; |
91 owner_key_util_ = NULL; | 90 owner_key_util_ = NULL; |
92 } | 91 } |
93 | 92 |
94 scoped_refptr<OwnerKey> DeviceSettingsService::GetOwnerKey() { | 93 scoped_refptr<OwnerKey> DeviceSettingsService::GetOwnerKey() { |
95 return owner_key_; | 94 return owner_key_; |
96 } | 95 } |
97 | 96 |
98 void DeviceSettingsService::Load() { | 97 void DeviceSettingsService::Load() { |
99 EnqueueLoad(false); | 98 EnqueueLoad(false); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 291 |
293 // Only remove the pending operation here, so new operations triggered by any | 292 // Only remove the pending operation here, so new operations triggered by any |
294 // of the callbacks above are queued up properly. | 293 // of the callbacks above are queued up properly. |
295 pending_operations_.pop_front(); | 294 pending_operations_.pop_front(); |
296 delete operation; | 295 delete operation; |
297 | 296 |
298 StartNextOperation(); | 297 StartNextOperation(); |
299 } | 298 } |
300 | 299 |
301 } // namespace chromeos | 300 } // namespace chromeos |
OLD | NEW |