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

Side by Side Diff: content/browser/loader/cross_site_resource_handler.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
OLDNEW
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 #include "content/browser/loader/cross_site_resource_handler.h" 5 #include "content/browser/loader/cross_site_resource_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 24 matching lines...) Expand all
35 bool leak_requests_for_testing_ = false; 35 bool leak_requests_for_testing_ = false;
36 36
37 // The parameters to OnCrossSiteResponseHelper exceed the number of arguments 37 // The parameters to OnCrossSiteResponseHelper exceed the number of arguments
38 // base::Bind supports. 38 // base::Bind supports.
39 struct CrossSiteResponseParams { 39 struct CrossSiteResponseParams {
40 CrossSiteResponseParams( 40 CrossSiteResponseParams(
41 int render_frame_id, 41 int render_frame_id,
42 const GlobalRequestID& global_request_id, 42 const GlobalRequestID& global_request_id,
43 const std::vector<GURL>& transfer_url_chain, 43 const std::vector<GURL>& transfer_url_chain,
44 const Referrer& referrer, 44 const Referrer& referrer,
45 PageTransition page_transition, 45 ui::PageTransition page_transition,
46 bool should_replace_current_entry) 46 bool should_replace_current_entry)
47 : render_frame_id(render_frame_id), 47 : render_frame_id(render_frame_id),
48 global_request_id(global_request_id), 48 global_request_id(global_request_id),
49 transfer_url_chain(transfer_url_chain), 49 transfer_url_chain(transfer_url_chain),
50 referrer(referrer), 50 referrer(referrer),
51 page_transition(page_transition), 51 page_transition(page_transition),
52 should_replace_current_entry(should_replace_current_entry) { 52 should_replace_current_entry(should_replace_current_entry) {
53 } 53 }
54 54
55 int render_frame_id; 55 int render_frame_id;
56 GlobalRequestID global_request_id; 56 GlobalRequestID global_request_id;
57 std::vector<GURL> transfer_url_chain; 57 std::vector<GURL> transfer_url_chain;
58 Referrer referrer; 58 Referrer referrer;
59 PageTransition page_transition; 59 ui::PageTransition page_transition;
60 bool should_replace_current_entry; 60 bool should_replace_current_entry;
61 }; 61 };
62 62
63 void OnCrossSiteResponseHelper(const CrossSiteResponseParams& params) { 63 void OnCrossSiteResponseHelper(const CrossSiteResponseParams& params) {
64 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request( 64 scoped_ptr<CrossSiteTransferringRequest> cross_site_transferring_request(
65 new CrossSiteTransferringRequest(params.global_request_id)); 65 new CrossSiteTransferringRequest(params.global_request_id));
66 66
67 RenderFrameHostImpl* rfh = 67 RenderFrameHostImpl* rfh =
68 RenderFrameHostImpl::FromID(params.global_request_id.child_id, 68 RenderFrameHostImpl::FromID(params.global_request_id.child_id,
69 params.render_frame_id); 69 params.render_frame_id);
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 controller()->Resume(); 416 controller()->Resume();
417 } 417 }
418 } 418 }
419 419
420 void CrossSiteResourceHandler::OnDidDefer() { 420 void CrossSiteResourceHandler::OnDidDefer() {
421 did_defer_ = true; 421 did_defer_ = true;
422 request()->LogBlockedBy("CrossSiteResourceHandler"); 422 request()->LogBlockedBy("CrossSiteResourceHandler");
423 } 423 }
424 424
425 } // namespace content 425 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698