| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ | 6 #define CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread.h" |
| 11 #include "content/common/notification_observer.h" | 11 #include "content/common/notification_observer.h" |
| 12 #include "content/common/notification_registrar.h" | 12 #include "content/common/notification_registrar.h" |
| 13 #include "webkit/appcache/appcache_policy.h" | 13 #include "webkit/appcache/appcache_policy.h" |
| 14 #include "webkit/appcache/appcache_service.h" | 14 #include "webkit/appcache/appcache_service.h" |
| 15 #include "webkit/quota/special_storage_policy.h" | 15 #include "webkit/quota/special_storage_policy.h" |
| 16 | 16 |
| 17 class FilePath; | 17 class FilePath; |
| 18 | 18 |
| 19 namespace content { | 19 namespace content { |
| 20 class ResourceContext; | 20 class ResourceContext; |
| 21 } | 21 } |
| 22 | 22 |
| 23 // An AppCacheService subclass used by the chrome. There is an instance | 23 // An AppCacheService subclass used by the chrome. There is an instance |
| 24 // associated with each Profile. This derivation adds refcounting semantics | 24 // associated with each BrowserContext. This derivation adds refcounting |
| 25 // since a profile has multiple URLRequestContexts which refer to the same | 25 // semantics since a browser context has multiple URLRequestContexts which refer |
| 26 // object, and those URLRequestContexts are refcounted independently of the | 26 // to the same object, and those URLRequestContexts are refcounted independently |
| 27 // owning profile. | 27 // of the owning browser context. |
| 28 // | 28 // |
| 29 // All methods, except the ctor, are expected to be called on | 29 // All methods, except the ctor, are expected to be called on |
| 30 // the IO thread (unless specifically called out in doc comments). | 30 // the IO thread (unless specifically called out in doc comments). |
| 31 class ChromeAppCacheService | 31 class ChromeAppCacheService |
| 32 : public base::RefCountedThreadSafe<ChromeAppCacheService, | 32 : public base::RefCountedThreadSafe<ChromeAppCacheService, |
| 33 BrowserThread::DeleteOnIOThread>, | 33 BrowserThread::DeleteOnIOThread>, |
| 34 public appcache::AppCacheService, | 34 public appcache::AppCacheService, |
| 35 public appcache::AppCachePolicy, | 35 public appcache::AppCachePolicy, |
| 36 public NotificationObserver { | 36 public NotificationObserver { |
| 37 public: | 37 public: |
| (...skipping 21 matching lines...) Expand all Loading... |
| 59 const NotificationDetails& details); | 59 const NotificationDetails& details); |
| 60 | 60 |
| 61 const content::ResourceContext* resource_context_; | 61 const content::ResourceContext* resource_context_; |
| 62 NotificationRegistrar registrar_; | 62 NotificationRegistrar registrar_; |
| 63 FilePath cache_path_; | 63 FilePath cache_path_; |
| 64 | 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService); | 65 DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 #endif // CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ | 68 #endif // CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ |
| OLD | NEW |