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

Side by Side Diff: chrome/browser/sessions/session_service_factory.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT 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 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sessions/session_service.h" 10 #include "chrome/browser/sessions/session_service.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 scoped_ptr<SessionService> service) { 48 scoped_ptr<SessionService> service) {
49 GetInstance()->BrowserContextShutdown(profile); 49 GetInstance()->BrowserContextShutdown(profile);
50 GetInstance()->BrowserContextDestroyed(profile); 50 GetInstance()->BrowserContextDestroyed(profile);
51 GetInstance()->Associate(profile, service.Pass()); 51 GetInstance()->Associate(profile, service.Pass());
52 } 52 }
53 #endif 53 #endif
54 54
55 static SessionServiceFactory* GetInstance(); 55 static SessionServiceFactory* GetInstance();
56 56
57 private: 57 private:
58 friend struct DefaultSingletonTraits<SessionServiceFactory>; 58 friend struct base::DefaultSingletonTraits<SessionServiceFactory>;
59 FRIEND_TEST_ALL_PREFIXES(SessionCrashedInfoBarDelegateUnitTest, 59 FRIEND_TEST_ALL_PREFIXES(SessionCrashedInfoBarDelegateUnitTest,
60 DetachingTabWithCrashedInfoBar); 60 DetachingTabWithCrashedInfoBar);
61 61
62 SessionServiceFactory(); 62 SessionServiceFactory();
63 ~SessionServiceFactory() override; 63 ~SessionServiceFactory() override;
64 64
65 // BrowserContextKeyedServiceFactory: 65 // BrowserContextKeyedServiceFactory:
66 KeyedService* BuildServiceInstanceFor( 66 KeyedService* BuildServiceInstanceFor(
67 content::BrowserContext* profile) const override; 67 content::BrowserContext* profile) const override;
68 bool ServiceIsCreatedWithBrowserContext() const override; 68 bool ServiceIsCreatedWithBrowserContext() const override;
69 bool ServiceIsNULLWhileTesting() const override; 69 bool ServiceIsNULLWhileTesting() const override;
70 }; 70 };
71 71
72 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_ 72 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698