Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "content/browser/loader/cross_site_resource_handler.h" | 6 #include "content/browser/loader/cross_site_resource_handler.h" |
| 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| 8 #include "content/browser/loader/resource_request_info_impl.h" | 8 #include "content/browser/loader/resource_request_info_impl.h" |
| 9 #include "content/browser/transition_request_manager.h" | 9 #include "content/browser/transition_request_manager.h" |
| 10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 TransitionBrowserTestObserver(WebContents* web_contents) | 34 TransitionBrowserTestObserver(WebContents* web_contents) |
| 35 : WebContentsObserver(web_contents), | 35 : WebContentsObserver(web_contents), |
| 36 request_(NULL), | 36 request_(NULL), |
| 37 did_defer_response_(false), | 37 did_defer_response_(false), |
| 38 is_transition_request_(false) { | 38 is_transition_request_(false) { |
| 39 } | 39 } |
| 40 | 40 |
| 41 virtual void RequestBeginning( | 41 virtual void RequestBeginning( |
| 42 net::URLRequest* request, | 42 net::URLRequest* request, |
| 43 ResourceContext* resource_context, | 43 ResourceContext* resource_context, |
| 44 appcache::AppCacheService* appcache_service, | 44 content::AppCacheService* appcache_service, |
|
jam
2014/06/25 21:51:14
nit: no "content::"
| |
| 45 ResourceType::Type resource_type, | 45 ResourceType::Type resource_type, |
| 46 int child_id, | 46 int child_id, |
| 47 int route_id, | 47 int route_id, |
| 48 ScopedVector<ResourceThrottle>* throttles) OVERRIDE { | 48 ScopedVector<ResourceThrottle>* throttles) OVERRIDE { |
| 49 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 49 CHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 50 ShellResourceDispatcherHostDelegate::RequestBeginning(request, | 50 ShellResourceDispatcherHostDelegate::RequestBeginning(request, |
| 51 resource_context, | 51 resource_context, |
| 52 appcache_service, | 52 appcache_service, |
| 53 resource_type, | 53 resource_type, |
| 54 child_id, | 54 child_id, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 110 | 110 |
| 111 ResourceDispatcherHost::Get()->SetDelegate(observer.get()); | 111 ResourceDispatcherHost::Get()->SetDelegate(observer.get()); |
| 112 observer->set_pending_transition_request(true); | 112 observer->set_pending_transition_request(true); |
| 113 | 113 |
| 114 NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html")); | 114 NavigateToURL(shell(), embedded_test_server()->GetURL("/title1.html")); |
| 115 | 115 |
| 116 ASSERT_TRUE(observer->did_defer_response()); | 116 ASSERT_TRUE(observer->did_defer_response()); |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace content | 119 } // namespace content |
| OLD | NEW |