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_SHELL_SHELL_RESOURCE_CONTEXT_H_ | 5 #ifndef CONTENT_SHELL_SHELL_RESOURCE_CONTEXT_H_ |
6 #define CONTENT_SHELL_SHELL_RESOURCE_CONTEXT_H_ | 6 #define CONTENT_SHELL_SHELL_RESOURCE_CONTEXT_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 "content/browser/download/download_manager.h" | |
12 #include "content/browser/resource_context.h" | 11 #include "content/browser/resource_context.h" |
13 | 12 |
14 class ChromeBlobStorageContext; | 13 class ChromeBlobStorageContext; |
| 14 class DownloadIdFactory; |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 class ShellURLRequestContextGetter; | 18 class ShellURLRequestContextGetter; |
19 | 19 |
20 class ShellResourceContext : public content::ResourceContext { | 20 class ShellResourceContext : public content::ResourceContext { |
21 public: | 21 public: |
22 ShellResourceContext( | 22 ShellResourceContext( |
23 ShellURLRequestContextGetter* getter, | 23 ShellURLRequestContextGetter* getter, |
24 ChromeBlobStorageContext* blob_storage_context, | 24 ChromeBlobStorageContext* blob_storage_context, |
25 DownloadManager::GetNextIdThunkType next_download_id_thunk); | 25 DownloadIdFactory* download_id_factory); |
26 virtual ~ShellResourceContext(); | 26 virtual ~ShellResourceContext(); |
27 | 27 |
28 private: | 28 private: |
29 virtual void EnsureInitialized() const OVERRIDE; | 29 virtual void EnsureInitialized() const OVERRIDE; |
30 | 30 |
31 void InitializeInternal(); | 31 void InitializeInternal(); |
32 | 32 |
33 scoped_refptr<ShellURLRequestContextGetter> getter_; | 33 scoped_refptr<ShellURLRequestContextGetter> getter_; |
34 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; | 34 scoped_refptr<ChromeBlobStorageContext> blob_storage_context_; |
35 DownloadManager::GetNextIdThunkType next_download_id_thunk_; | 35 scoped_refptr<DownloadIdFactory> download_id_factory_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(ShellResourceContext); | 37 DISALLOW_COPY_AND_ASSIGN(ShellResourceContext); |
38 }; | 38 }; |
39 | 39 |
40 } // namespace content | 40 } // namespace content |
41 | 41 |
42 #endif // CONTENT_SHELL_SHELL_RESOURCE_CONTEXT_H_ | 42 #endif // CONTENT_SHELL_SHELL_RESOURCE_CONTEXT_H_ |
OLD | NEW |