| 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 #ifndef COMPONENTS_BROWSER_CONTEXT_KEYED_SERVICE_BROWSER_CONTEXT_KEYED_SERVICE_H
_ | 5 #ifndef COMPONENTS_BROWSER_CONTEXT_KEYED_SERVICE_BROWSER_CONTEXT_KEYED_SERVICE_H
_ |
| 6 #define COMPONENTS_BROWSER_CONTEXT_KEYED_SERVICE_BROWSER_CONTEXT_KEYED_SERVICE_H
_ | 6 #define COMPONENTS_BROWSER_CONTEXT_KEYED_SERVICE_BROWSER_CONTEXT_KEYED_SERVICE_H
_ |
| 7 | 7 |
| 8 class ProfileKeyedServiceFactory; | 8 class BrowserContextKeyedServiceFactory; |
| 9 | 9 |
| 10 // Base class for all ProfileKeyedServices to allow for correct destruction | 10 // Base class for all BrowserContextKeyedServices to allow for correct |
| 11 // order. | 11 // destruction order. |
| 12 // | 12 // |
| 13 // Many services that hang off Profile have a two-pass shutdown. Many | 13 // Many services that hang off BrowserContext have a two-pass shutdown. Many |
| 14 // subsystems need a first pass shutdown phase where they drop references. Not | 14 // subsystems need a first pass shutdown phase where they drop references. Not |
| 15 // all services will need this, so there's a default implementation. Only once | 15 // all services will need this, so there's a default implementation. Only once |
| 16 // every system has been given a chance to drop references do we start deleting | 16 // every system has been given a chance to drop references do we start deleting |
| 17 // objects. | 17 // objects. |
| 18 class ProfileKeyedService { | 18 class BrowserContextKeyedService { |
| 19 public: | 19 public: |
| 20 // The first pass is to call Shutdown on a ProfileKeyedService. | 20 // The first pass is to call Shutdown on a BrowserContextKeyedService. |
| 21 virtual void Shutdown() {} | 21 virtual void Shutdown() {} |
| 22 | 22 |
| 23 protected: | 23 protected: |
| 24 friend class ProfileKeyedServiceFactory; | 24 friend class BrowserContextKeyedServiceFactory; |
| 25 | 25 |
| 26 // The second pass is the actual deletion of each object. | 26 // The second pass is the actual deletion of each object. |
| 27 virtual ~ProfileKeyedService() {} | 27 virtual ~BrowserContextKeyedService() {} |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 #endif // COMPONENTS_BROWSER_CONTEXT_KEYED_SERVICE_BROWSER_CONTEXT_KEYED_SERVIC
E_H_ | 30 #endif // COMPONENTS_BROWSER_CONTEXT_KEYED_SERVICE_BROWSER_CONTEXT_KEYED_SERVIC
E_H_ |
| OLD | NEW |