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" |
(...skipping 22 matching lines...) Expand all Loading... |
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: |
38 explicit ChromeAppCacheService(quota::QuotaManagerProxy* proxy); | 38 explicit ChromeAppCacheService(quota::QuotaManagerProxy* proxy); |
39 | 39 |
40 void InitializeOnIOThread( | 40 void InitializeOnIOThread( |
41 const FilePath& cache_path, // may be empty to use in-memory structures | 41 const FilePath& cache_path, // may be empty to use in-memory structures |
42 const content::ResourceContext* resource_context, | 42 const content::ResourceContext* resource_context, |
43 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy, | 43 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy); |
44 bool clear_local_state_on_exit); | |
45 | |
46 void SetClearLocalStateOnExit(bool clear_local_state); | |
47 | 44 |
48 private: | 45 private: |
49 friend class BrowserThread; | 46 friend class BrowserThread; |
50 friend class DeleteTask<ChromeAppCacheService>; | 47 friend class DeleteTask<ChromeAppCacheService>; |
51 | 48 |
52 virtual ~ChromeAppCacheService(); | 49 virtual ~ChromeAppCacheService(); |
53 | 50 |
54 // AppCachePolicy overrides | 51 // AppCachePolicy overrides |
55 virtual bool CanLoadAppCache(const GURL& manifest_url); | 52 virtual bool CanLoadAppCache(const GURL& manifest_url); |
56 virtual int CanCreateAppCache(const GURL& manifest_url, | 53 virtual int CanCreateAppCache(const GURL& manifest_url, |
57 net::CompletionCallback* callback); | 54 net::CompletionCallback* callback); |
58 | 55 |
59 // NotificationObserver override | 56 // NotificationObserver override |
60 virtual void Observe(int type, | 57 virtual void Observe(int type, |
61 const NotificationSource& source, | 58 const NotificationSource& source, |
62 const NotificationDetails& details); | 59 const NotificationDetails& details); |
63 | 60 |
64 const content::ResourceContext* resource_context_; | 61 const content::ResourceContext* resource_context_; |
65 NotificationRegistrar registrar_; | 62 NotificationRegistrar registrar_; |
66 bool clear_local_state_on_exit_; | |
67 FilePath cache_path_; | 63 FilePath cache_path_; |
68 | 64 |
69 DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService); | 65 DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService); |
70 }; | 66 }; |
71 | 67 |
72 #endif // CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ | 68 #endif // CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_ |
OLD | NEW |