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

Side by Side Diff: chrome/browser/sessions/tab_restore_service_factory.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove todo Created 5 years, 3 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
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/sessions/tab_restore_service_factory.h" 5 #include "chrome/browser/sessions/tab_restore_service_factory.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/sessions/tab_restore_service.h" 8 #include "chrome/browser/sessions/tab_restore_service.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" 9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 10
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 // static 24 // static
25 void TabRestoreServiceFactory::ResetForProfile(Profile* profile) { 25 void TabRestoreServiceFactory::ResetForProfile(Profile* profile) {
26 TabRestoreServiceFactory* factory = GetInstance(); 26 TabRestoreServiceFactory* factory = GetInstance();
27 factory->BrowserContextShutdown(profile); 27 factory->BrowserContextShutdown(profile);
28 factory->BrowserContextDestroyed(profile); 28 factory->BrowserContextDestroyed(profile);
29 } 29 }
30 30
31 TabRestoreServiceFactory* TabRestoreServiceFactory::GetInstance() { 31 TabRestoreServiceFactory* TabRestoreServiceFactory::GetInstance() {
32 return Singleton<TabRestoreServiceFactory>::get(); 32 return base::Singleton<TabRestoreServiceFactory>::get();
33 } 33 }
34 34
35 TabRestoreServiceFactory::TabRestoreServiceFactory() 35 TabRestoreServiceFactory::TabRestoreServiceFactory()
36 : BrowserContextKeyedServiceFactory( 36 : BrowserContextKeyedServiceFactory(
37 "TabRestoreService", 37 "TabRestoreService",
38 BrowserContextDependencyManager::GetInstance()) { 38 BrowserContextDependencyManager::GetInstance()) {
39 } 39 }
40 40
41 TabRestoreServiceFactory::~TabRestoreServiceFactory() { 41 TabRestoreServiceFactory::~TabRestoreServiceFactory() {
42 } 42 }
43 43
44 bool TabRestoreServiceFactory::ServiceIsNULLWhileTesting() const { 44 bool TabRestoreServiceFactory::ServiceIsNULLWhileTesting() const {
45 return true; 45 return true;
46 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698