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/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/message_loop_helpers.h" |
11 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
12 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
13 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
14 #include "content/public/browser/notification_registrar.h" | 15 #include "content/public/browser/notification_registrar.h" |
15 #include "webkit/appcache/appcache_policy.h" | 16 #include "webkit/appcache/appcache_policy.h" |
16 #include "webkit/appcache/appcache_service.h" | 17 #include "webkit/appcache/appcache_service.h" |
17 #include "webkit/quota/special_storage_policy.h" | 18 #include "webkit/quota/special_storage_policy.h" |
18 | 19 |
19 class FilePath; | 20 class FilePath; |
20 | 21 |
(...skipping 24 matching lines...) Expand all Loading... |
45 void InitializeOnIOThread( | 46 void InitializeOnIOThread( |
46 const FilePath& cache_path, // may be empty to use in-memory structures | 47 const FilePath& cache_path, // may be empty to use in-memory structures |
47 const content::ResourceContext* resource_context, | 48 const content::ResourceContext* resource_context, |
48 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy); | 49 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy); |
49 | 50 |
50 private: | 51 private: |
51 friend class base::RefCountedThreadSafe< | 52 friend class base::RefCountedThreadSafe< |
52 ChromeAppCacheService, | 53 ChromeAppCacheService, |
53 content::BrowserThread::DeleteOnIOThread>; | 54 content::BrowserThread::DeleteOnIOThread>; |
54 friend class content::BrowserThread; | 55 friend class content::BrowserThread; |
55 friend class DeleteTask<ChromeAppCacheService>; | 56 friend class base::DeleteHelper<ChromeAppCacheService>; |
56 | 57 |
57 virtual ~ChromeAppCacheService(); | 58 virtual ~ChromeAppCacheService(); |
58 | 59 |
59 // AppCachePolicy overrides | 60 // AppCachePolicy overrides |
60 virtual bool CanLoadAppCache(const GURL& manifest_url, | 61 virtual bool CanLoadAppCache(const GURL& manifest_url, |
61 const GURL& first_party) OVERRIDE; | 62 const GURL& first_party) OVERRIDE; |
62 virtual bool CanCreateAppCache(const GURL& manifest_url, | 63 virtual bool CanCreateAppCache(const GURL& manifest_url, |
63 const GURL& first_party) OVERRIDE; | 64 const GURL& first_party) OVERRIDE; |
64 | 65 |
65 // content::NotificationObserver override | 66 // content::NotificationObserver override |
66 virtual void Observe(int type, | 67 virtual void Observe(int type, |
67 const content::NotificationSource& source, | 68 const content::NotificationSource& source, |
68 const content::NotificationDetails& details) OVERRIDE; | 69 const content::NotificationDetails& details) OVERRIDE; |
69 | 70 |
70 const content::ResourceContext* resource_context_; | 71 const content::ResourceContext* resource_context_; |
71 content::NotificationRegistrar registrar_; | 72 content::NotificationRegistrar registrar_; |
72 FilePath cache_path_; | 73 FilePath cache_path_; |
73 | 74 |
74 DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService); | 75 DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService); |
75 }; | 76 }; |
76 | 77 |
77 #endif // CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ | 78 #endif // CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ |
OLD | NEW |