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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_service.cc

Issue 11419184: Add public accounts to UserManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-upload against the correct upstream commit. Created 8 years 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) 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
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 session_manager_client_->RemoveObserver(this); 88 if (session_manager_client_)
89 session_manager_client_->RemoveObserver(this);
89 session_manager_client_ = NULL; 90 session_manager_client_ = NULL;
90 owner_key_util_ = NULL; 91 owner_key_util_ = NULL;
91 } 92 }
92 93
93 scoped_refptr<OwnerKey> DeviceSettingsService::GetOwnerKey() { 94 scoped_refptr<OwnerKey> DeviceSettingsService::GetOwnerKey() {
94 return owner_key_; 95 return owner_key_;
95 } 96 }
96 97
97 void DeviceSettingsService::Load() { 98 void DeviceSettingsService::Load() {
98 EnqueueLoad(false); 99 EnqueueLoad(false);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 292
292 // Only remove the pending operation here, so new operations triggered by any 293 // Only remove the pending operation here, so new operations triggered by any
293 // of the callbacks above are queued up properly. 294 // of the callbacks above are queued up properly.
294 pending_operations_.pop_front(); 295 pending_operations_.pop_front();
295 delete operation; 296 delete operation;
296 297
297 StartNextOperation(); 298 StartNextOperation();
298 } 299 }
299 300
300 } // namespace chromeos 301 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698