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/cros_settings.h" | 5 #include "chrome/browser/chromeos/settings/cros_settings.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 : initialized_device_settings_service_(false) { | 333 : initialized_device_settings_service_(false) { |
334 if (!DeviceSettingsService::IsInitialized()) { | 334 if (!DeviceSettingsService::IsInitialized()) { |
335 DeviceSettingsService::Initialize(); | 335 DeviceSettingsService::Initialize(); |
336 initialized_device_settings_service_ = true; | 336 initialized_device_settings_service_ = true; |
337 } | 337 } |
338 CrosSettings::Initialize(); | 338 CrosSettings::Initialize(); |
339 } | 339 } |
340 | 340 |
341 ScopedTestCrosSettings::~ScopedTestCrosSettings() { | 341 ScopedTestCrosSettings::~ScopedTestCrosSettings() { |
342 // UserManager holds a CrosSettings*, so ensure that it is destroyed. | 342 // UserManager holds a CrosSettings*, so ensure that it is destroyed. |
343 UserManager::Set(NULL); | 343 UserManager* old_manager = UserManager::Set(NULL); |
| 344 delete old_manager; |
344 CrosSettings::Shutdown(); | 345 CrosSettings::Shutdown(); |
345 if (initialized_device_settings_service_) | 346 if (initialized_device_settings_service_) |
346 DeviceSettingsService::Shutdown(); | 347 DeviceSettingsService::Shutdown(); |
347 } | 348 } |
348 | 349 |
349 } // namespace chromeos | 350 } // namespace chromeos |
OLD | NEW |