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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/strings/string_util.h" | 6 #include "base/strings/string_util.h" |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/policy/cloud/policy_header_service_factory.h" | 8 #include "chrome/browser/policy/cloud/policy_header_service_factory.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" | 10 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 explicit TestDispatcherHostDelegate( | 53 explicit TestDispatcherHostDelegate( |
54 prerender::PrerenderTracker* prerender_tracker) | 54 prerender::PrerenderTracker* prerender_tracker) |
55 : ChromeResourceDispatcherHostDelegate(prerender_tracker) { | 55 : ChromeResourceDispatcherHostDelegate(prerender_tracker) { |
56 } | 56 } |
57 | 57 |
58 virtual ~TestDispatcherHostDelegate() {} | 58 virtual ~TestDispatcherHostDelegate() {} |
59 | 59 |
60 virtual void RequestBeginning( | 60 virtual void RequestBeginning( |
61 net::URLRequest* request, | 61 net::URLRequest* request, |
62 content::ResourceContext* resource_context, | 62 content::ResourceContext* resource_context, |
63 appcache::AppCacheService* appcache_service, | 63 content::AppCacheService* appcache_service, |
64 ResourceType::Type resource_type, | 64 ResourceType::Type resource_type, |
65 int child_id, | 65 int child_id, |
66 int route_id, | 66 int route_id, |
67 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE { | 67 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE { |
68 ChromeResourceDispatcherHostDelegate::RequestBeginning( | 68 ChromeResourceDispatcherHostDelegate::RequestBeginning( |
69 request, | 69 request, |
70 resource_context, | 70 resource_context, |
71 appcache_service, | 71 appcache_service, |
72 resource_type, | 72 resource_type, |
73 child_id, | 73 child_id, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 redirect_url += kServerRedirectUrl; | 178 redirect_url += kServerRedirectUrl; |
179 redirect_url += "?"; | 179 redirect_url += "?"; |
180 redirect_url += dm_url_.spec(); | 180 redirect_url += dm_url_.spec(); |
181 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL( | 181 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL( |
182 redirect_url)); | 182 redirect_url)); |
183 std::string value; | 183 std::string value; |
184 ASSERT_TRUE(dispatcher_host_delegate_->request_headers_.GetHeader( | 184 ASSERT_TRUE(dispatcher_host_delegate_->request_headers_.GetHeader( |
185 policy::kChromePolicyHeader, &value)); | 185 policy::kChromePolicyHeader, &value)); |
186 ASSERT_EQ(kTestPolicyHeader, value); | 186 ASSERT_EQ(kTestPolicyHeader, value); |
187 } | 187 } |
OLD | NEW |