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