OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | |
8 | 7 |
9 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
11 #include "content/public/browser/resource_context.h" | 10 #include "content/public/browser/resource_context.h" |
12 | 11 |
13 namespace content { | 12 namespace content { |
14 | 13 |
15 class ShellURLRequestContextGetter; | 14 class ShellURLRequestContextGetter; |
16 | 15 |
17 class ShellResourceContext : public content::ResourceContext { | 16 class ShellResourceContext : public content::ResourceContext { |
18 public: | 17 public: |
19 explicit ShellResourceContext(ShellURLRequestContextGetter* getter); | 18 explicit ShellResourceContext(ShellURLRequestContextGetter* getter); |
20 virtual ~ShellResourceContext(); | 19 virtual ~ShellResourceContext(); |
21 | 20 |
22 private: | 21 private: |
23 // ResourceContext implementation: | 22 // ResourceContext implementation: |
24 virtual net::HostResolver* GetHostResolver() OVERRIDE; | 23 virtual net::HostResolver* GetHostResolver() OVERRIDE; |
25 virtual net::URLRequestContext* GetRequestContext() OVERRIDE; | 24 virtual net::URLRequestContext* GetRequestContext() OVERRIDE; |
26 | 25 |
27 scoped_refptr<ShellURLRequestContextGetter> getter_; | 26 scoped_refptr<ShellURLRequestContextGetter> getter_; |
28 | 27 |
29 DISALLOW_COPY_AND_ASSIGN(ShellResourceContext); | 28 DISALLOW_COPY_AND_ASSIGN(ShellResourceContext); |
30 }; | 29 }; |
31 | 30 |
32 } // namespace content | 31 } // namespace content |
33 | 32 |
34 #endif // CONTENT_SHELL_SHELL_RESOURCE_CONTEXT_H_ | 33 #endif // CONTENT_SHELL_SHELL_RESOURCE_CONTEXT_H_ |
OLD | NEW |