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

Side by Side Diff: chrome/browser/prerender/prerender_contents.cc

Issue 1144253003: Remove --enable-strict-site-isolation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Charlie's fixes Created 5 years, 6 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
« no previous file with comments | « no previous file | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/prerender/prerender_contents.h" 5 #include "chrome/browser/prerender/prerender_contents.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 public: 83 public:
84 explicit WebContentsDelegateImpl(PrerenderContents* prerender_contents) 84 explicit WebContentsDelegateImpl(PrerenderContents* prerender_contents)
85 : prerender_contents_(prerender_contents) { 85 : prerender_contents_(prerender_contents) {
86 } 86 }
87 87
88 // content::WebContentsDelegate implementation: 88 // content::WebContentsDelegate implementation:
89 WebContents* OpenURLFromTab(WebContents* source, 89 WebContents* OpenURLFromTab(WebContents* source,
90 const OpenURLParams& params) override { 90 const OpenURLParams& params) override {
91 // |OpenURLFromTab| is typically called when a frame performs a navigation 91 // |OpenURLFromTab| is typically called when a frame performs a navigation
92 // that requires the browser to perform the transition instead of WebKit. 92 // that requires the browser to perform the transition instead of WebKit.
93 // Examples include prerendering a site that redirects to an app URL, 93 // Examples include prerendering a site that redirects to an app URL, or if
94 // or if --enable-strict-site-isolation is specified and the prerendered 94 // --site-per-process is specified and the prerendered frame redirects to a
95 // frame redirects to a different origin. 95 // different origin.
96 // TODO(cbentzel): Consider supporting this if it is a common case during 96 // TODO(cbentzel): Consider supporting this for CURRENT_TAB dispositions, if
97 // prerenders. 97 // it is a common case during prerenders.
98 prerender_contents_->Destroy(FINAL_STATUS_OPEN_URL); 98 prerender_contents_->Destroy(FINAL_STATUS_OPEN_URL);
99 return NULL; 99 return NULL;
100 } 100 }
101 101
102 void CloseContents(content::WebContents* contents) override { 102 void CloseContents(content::WebContents* contents) override {
103 prerender_contents_->Destroy(FINAL_STATUS_CLOSED); 103 prerender_contents_->Destroy(FINAL_STATUS_CLOSED);
104 } 104 }
105 105
106 void CanDownload(const GURL& url, 106 void CanDownload(const GURL& url,
107 const std::string& request_method, 107 const std::string& request_method,
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 void PrerenderContents::AddResourceThrottle( 739 void PrerenderContents::AddResourceThrottle(
740 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { 740 const base::WeakPtr<PrerenderResourceThrottle>& throttle) {
741 resource_throttles_.push_back(throttle); 741 resource_throttles_.push_back(throttle);
742 } 742 }
743 743
744 void PrerenderContents::AddNetworkBytes(int64 bytes) { 744 void PrerenderContents::AddNetworkBytes(int64 bytes) {
745 network_bytes_ += bytes; 745 network_bytes_ += bytes;
746 } 746 }
747 747
748 } // namespace prerender 748 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | content/browser/child_process_security_policy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698