| 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 CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "chrome/browser/external_protocol/external_protocol_handler.h" | 15 #include "chrome/browser/external_protocol/external_protocol_handler.h" |
| 16 #include "content/public/browser/resource_dispatcher_host_delegate.h" | 16 #include "content/public/browser/resource_dispatcher_host_delegate.h" |
| 17 #include "extensions/features/features.h" |
| 17 | 18 |
| 18 class DelayedResourceQueue; | 19 class DelayedResourceQueue; |
| 19 class DownloadRequestLimiter; | 20 class DownloadRequestLimiter; |
| 20 | 21 |
| 21 namespace content { | 22 namespace content { |
| 22 class NavigationData; | 23 class NavigationData; |
| 23 } | 24 } |
| 24 | 25 |
| 25 namespace extensions { | 26 namespace extensions { |
| 26 class UserScriptListener; | 27 class UserScriptListener; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 100 |
| 100 protected: | 101 protected: |
| 101 // Virtual for testing. | 102 // Virtual for testing. |
| 102 virtual void AppendStandardResourceThrottles( | 103 virtual void AppendStandardResourceThrottles( |
| 103 net::URLRequest* request, | 104 net::URLRequest* request, |
| 104 content::ResourceContext* resource_context, | 105 content::ResourceContext* resource_context, |
| 105 content::ResourceType resource_type, | 106 content::ResourceType resource_type, |
| 106 ScopedVector<content::ResourceThrottle>* throttles); | 107 ScopedVector<content::ResourceThrottle>* throttles); |
| 107 | 108 |
| 108 private: | 109 private: |
| 109 #if defined(ENABLE_EXTENSIONS) | 110 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 110 struct StreamTargetInfo { | 111 struct StreamTargetInfo { |
| 111 std::string extension_id; | 112 std::string extension_id; |
| 112 std::string view_id; | 113 std::string view_id; |
| 113 }; | 114 }; |
| 114 #endif | 115 #endif |
| 115 | 116 |
| 116 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; | 117 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; |
| 117 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_; | 118 scoped_refptr<safe_browsing::SafeBrowsingService> safe_browsing_; |
| 118 #if defined(ENABLE_EXTENSIONS) | 119 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 119 scoped_refptr<extensions::UserScriptListener> user_script_listener_; | 120 scoped_refptr<extensions::UserScriptListener> user_script_listener_; |
| 120 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; | 121 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; |
| 121 #endif | 122 #endif |
| 122 | 123 |
| 123 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); | 124 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); |
| 124 }; | 125 }; |
| 125 | 126 |
| 126 #endif // CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 127 #endif // CHROME_BROWSER_LOADER_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |