Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate_browsertest.cc

Issue 481593002: Remove child/route parameters from ShouldBeginRequest and RequestBeginning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android build Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 resource_type, 66 ResourceType resource_type,
67 int child_id,
68 int route_id,
69 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE { 67 ScopedVector<content::ResourceThrottle>* throttles) OVERRIDE {
70 ChromeResourceDispatcherHostDelegate::RequestBeginning( 68 ChromeResourceDispatcherHostDelegate::RequestBeginning(
71 request, 69 request,
72 resource_context, 70 resource_context,
73 appcache_service, 71 appcache_service,
74 resource_type, 72 resource_type,
75 child_id,
76 route_id,
77 throttles); 73 throttles);
78 request_headers_.MergeFrom(request->extra_request_headers()); 74 request_headers_.MergeFrom(request->extra_request_headers());
79 } 75 }
80 76
81 virtual void OnRequestRedirected( 77 virtual void OnRequestRedirected(
82 const GURL& redirect_url, 78 const GURL& redirect_url,
83 net::URLRequest* request, 79 net::URLRequest* request,
84 content::ResourceContext* resource_context, 80 content::ResourceContext* resource_context,
85 content::ResourceResponse* response) OVERRIDE { 81 content::ResourceResponse* response) OVERRIDE {
86 ChromeResourceDispatcherHostDelegate::OnRequestRedirected( 82 ChromeResourceDispatcherHostDelegate::OnRequestRedirected(
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 redirect_url += kServerRedirectUrl; 175 redirect_url += kServerRedirectUrl;
180 redirect_url += "?"; 176 redirect_url += "?";
181 redirect_url += dm_url_.spec(); 177 redirect_url += dm_url_.spec();
182 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL( 178 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->GetURL(
183 redirect_url)); 179 redirect_url));
184 std::string value; 180 std::string value;
185 ASSERT_TRUE(dispatcher_host_delegate_->request_headers_.GetHeader( 181 ASSERT_TRUE(dispatcher_host_delegate_->request_headers_.GetHeader(
186 policy::kChromePolicyHeader, &value)); 182 policy::kChromePolicyHeader, &value));
187 ASSERT_EQ(kTestPolicyHeader, value); 183 ASSERT_EQ(kTestPolicyHeader, value);
188 } 184 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc ('k') | chrome/browser/signin/signin_header_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698