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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 prerender::PrerenderTracker* prerender_tracker) | 56 prerender::PrerenderTracker* prerender_tracker) |
57 : ChromeResourceDispatcherHostDelegate(prerender_tracker) { | 57 : ChromeResourceDispatcherHostDelegate(prerender_tracker) { |
58 } | 58 } |
59 | 59 |
60 virtual ~TestDispatcherHostDelegate() {} | 60 virtual ~TestDispatcherHostDelegate() {} |
61 | 61 |
62 virtual void RequestBeginning( | 62 virtual void RequestBeginning( |
63 net::URLRequest* request, | 63 net::URLRequest* request, |
64 content::ResourceContext* resource_context, | 64 content::ResourceContext* resource_context, |
65 content::AppCacheService* appcache_service, | 65 content::AppCacheService* appcache_service, |
66 ResourceType::Type resource_type, | 66 ResourceType resource_type, |
67 int child_id, | 67 int child_id, |
68 int route_id, | 68 int route_id, |
69 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE { | 69 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE { |
70 ChromeResourceDispatcherHostDelegate::RequestBeginning( | 70 ChromeResourceDispatcherHostDelegate::RequestBeginning( |
71 request, | 71 request, |
72 resource_context, | 72 resource_context, |
73 appcache_service, | 73 appcache_service, |
74 resource_type, | 74 resource_type, |
75 child_id, | 75 child_id, |
76 route_id, | 76 route_id, |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 redirect_url += kServerRedirectUrl; | 179 redirect_url += kServerRedirectUrl; |
180 redirect_url += "?"; | 180 redirect_url += "?"; |
181 redirect_url += dm_url_.spec(); | 181 redirect_url += dm_url_.spec(); |
182 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL( | 182 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL( |
183 redirect_url)); | 183 redirect_url)); |
184 std::string value; | 184 std::string value; |
185 ASSERT_TRUE(dispatcher_host_delegate_->request_headers_.GetHeader( | 185 ASSERT_TRUE(dispatcher_host_delegate_->request_headers_.GetHeader( |
186 policy::kChromePolicyHeader, &value)); | 186 policy::kChromePolicyHeader, &value)); |
187 ASSERT_EQ(kTestPolicyHeader, value); | 187 ASSERT_EQ(kTestPolicyHeader, value); |
188 } | 188 } |
OLD | NEW |