OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CACHE_STORAGE_CACHE_STORAGE_CONTEXT_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CONTEXT_IMPL_H_ |
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CONTEXT_IMPL_H_ | 6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CONTEXT_IMPL_H_ |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 bool is_incognito() const { return is_incognito_; } | 53 bool is_incognito() const { return is_incognito_; } |
54 | 54 |
55 // The URLRequestContext doesn't exist until after the StoragePartition is | 55 // The URLRequestContext doesn't exist until after the StoragePartition is |
56 // made (which is after this object is made). This function must be called | 56 // made (which is after this object is made). This function must be called |
57 // after this object is created but before any CacheStorageCache operations. | 57 // after this object is created but before any CacheStorageCache operations. |
58 // It must be called on the IO thread. If either parameter is NULL the | 58 // It must be called on the IO thread. If either parameter is NULL the |
59 // function immediately returns without forwarding to the | 59 // function immediately returns without forwarding to the |
60 // CacheStorageManager. | 60 // CacheStorageManager. |
61 void SetBlobParametersForCache( | 61 void SetBlobParametersForCache( |
62 net::URLRequestContextGetter* request_context, | 62 net::URLRequestContextGetter* request_context_getter, |
63 ChromeBlobStorageContext* blob_storage_context); | 63 ChromeBlobStorageContext* blob_storage_context); |
64 | 64 |
65 private: | 65 private: |
66 friend class base::RefCountedThreadSafe<CacheStorageContextImpl>; | 66 friend class base::RefCountedThreadSafe<CacheStorageContextImpl>; |
67 | 67 |
68 ~CacheStorageContextImpl(); | 68 ~CacheStorageContextImpl(); |
69 | 69 |
70 void CreateCacheStorageManager( | 70 void CreateCacheStorageManager( |
71 const base::FilePath& user_data_directory, | 71 const base::FilePath& user_data_directory, |
72 const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner, | 72 const scoped_refptr<base::SequencedTaskRunner>& cache_task_runner, |
73 storage::QuotaManagerProxy* quota_manager_proxy, | 73 storage::QuotaManagerProxy* quota_manager_proxy, |
74 storage::SpecialStoragePolicy* special_storage_policy); | 74 storage::SpecialStoragePolicy* special_storage_policy); |
75 | 75 |
76 void ShutdownOnIO(); | 76 void ShutdownOnIO(); |
77 | 77 |
78 // Initialized in Init(); true if the user data directory is empty. | 78 // Initialized in Init(); true if the user data directory is empty. |
79 bool is_incognito_ = false; | 79 bool is_incognito_ = false; |
80 | 80 |
81 // Only accessed on the IO thread. | 81 // Only accessed on the IO thread. |
82 scoped_ptr<CacheStorageManager> cache_manager_; | 82 scoped_ptr<CacheStorageManager> cache_manager_; |
83 }; | 83 }; |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
86 | 86 |
87 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CONTEXT_IMPL_H_ | 87 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_CONTEXT_IMPL_H_ |
OLD | NEW |