| 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_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 content::ResourceContext* resource_context, | 89 content::ResourceContext* resource_context, |
| 90 content::ResourceResponse* response) OVERRIDE; | 90 content::ResourceResponse* response) OVERRIDE; |
| 91 virtual void RequestComplete(net::URLRequest* url_request) OVERRIDE; | 91 virtual void RequestComplete(net::URLRequest* url_request) OVERRIDE; |
| 92 | 92 |
| 93 // Called on the UI thread. Allows switching out the | 93 // Called on the UI thread. Allows switching out the |
| 94 // ExternalProtocolHandler::Delegate for testing code. | 94 // ExternalProtocolHandler::Delegate for testing code. |
| 95 static void SetExternalProtocolHandlerDelegateForTesting( | 95 static void SetExternalProtocolHandlerDelegateForTesting( |
| 96 ExternalProtocolHandler::Delegate* delegate); | 96 ExternalProtocolHandler::Delegate* delegate); |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 #if defined(ENABLE_EXTENSIONS) |
| 99 struct StreamTargetInfo { | 100 struct StreamTargetInfo { |
| 100 std::string extension_id; | 101 std::string extension_id; |
| 101 std::string view_id; | 102 std::string view_id; |
| 102 }; | 103 }; |
| 104 #endif |
| 103 | 105 |
| 104 void AppendStandardResourceThrottles( | 106 void AppendStandardResourceThrottles( |
| 105 net::URLRequest* request, | 107 net::URLRequest* request, |
| 106 content::ResourceContext* resource_context, | 108 content::ResourceContext* resource_context, |
| 107 content::ResourceType::Type resource_type, | 109 content::ResourceType::Type resource_type, |
| 108 ScopedVector<content::ResourceThrottle>* throttles); | 110 ScopedVector<content::ResourceThrottle>* throttles); |
| 109 | 111 |
| 110 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 112 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 111 // Append headers required to tell Gaia whether the sync interstitial | 113 // Append headers required to tell Gaia whether the sync interstitial |
| 112 // should be shown or not. This header is only added for valid Gaia URLs. | 114 // should be shown or not. This header is only added for valid Gaia URLs. |
| 113 void AppendChromeSyncGaiaHeader( | 115 void AppendChromeSyncGaiaHeader( |
| 114 net::URLRequest* request, | 116 net::URLRequest* request, |
| 115 content::ResourceContext* resource_context); | 117 content::ResourceContext* resource_context); |
| 116 #endif | 118 #endif |
| 117 | 119 |
| 118 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; | 120 scoped_refptr<DownloadRequestLimiter> download_request_limiter_; |
| 119 scoped_refptr<SafeBrowsingService> safe_browsing_; | 121 scoped_refptr<SafeBrowsingService> safe_browsing_; |
| 122 #if defined(ENABLE_EXTENSIONS) |
| 120 scoped_refptr<extensions::UserScriptListener> user_script_listener_; | 123 scoped_refptr<extensions::UserScriptListener> user_script_listener_; |
| 124 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; |
| 125 #endif |
| 121 prerender::PrerenderTracker* prerender_tracker_; | 126 prerender::PrerenderTracker* prerender_tracker_; |
| 122 std::map<net::URLRequest*, StreamTargetInfo> stream_target_info_; | |
| 123 | 127 |
| 124 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); | 128 DISALLOW_COPY_AND_ASSIGN(ChromeResourceDispatcherHostDelegate); |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE
_H_ | 131 #endif // CHROME_BROWSER_RENDERER_HOST_CHROME_RESOURCE_DISPATCHER_HOST_DELEGATE
_H_ |
| OLD | NEW |