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

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

Issue 14225019: Delete old user manager in ~ScopedTestCrosSettings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert suppressions Created 7 years, 8 months 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
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
OLDNEW
« no previous file with comments | « no previous file | tools/heapcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698