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

Side by Side Diff: content/browser/frame_host/interstitial_page_impl.cc

Issue 2461093002: Revert of Trigger Dangerous indicator for unsafe subresources (Closed)
Patch Set: Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/interstitial_page_impl.h" 5 #include "content/browser/frame_host/interstitial_page_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 base::WrapUnique(new NavigationEntryImpl); 228 base::WrapUnique(new NavigationEntryImpl);
229 entry->SetURL(url_); 229 entry->SetURL(url_);
230 entry->SetVirtualURL(url_); 230 entry->SetVirtualURL(url_);
231 entry->set_page_type(PAGE_TYPE_INTERSTITIAL); 231 entry->set_page_type(PAGE_TYPE_INTERSTITIAL);
232 232
233 // Give delegates a chance to set some states on the navigation entry. 233 // Give delegates a chance to set some states on the navigation entry.
234 delegate_->OverrideEntry(entry.get()); 234 delegate_->OverrideEntry(entry.get());
235 235
236 controller_->SetTransientEntry(std::move(entry)); 236 controller_->SetTransientEntry(std::move(entry));
237 237
238 static_cast<WebContentsImpl*>(web_contents_) 238 static_cast<WebContentsImpl*>(web_contents_)->DidChangeVisibleSSLState();
239 ->DidChangeVisibleSecurityState();
240 } 239 }
241 240
242 DCHECK(!render_view_host_); 241 DCHECK(!render_view_host_);
243 render_view_host_ = CreateRenderViewHost(); 242 render_view_host_ = CreateRenderViewHost();
244 CreateWebContentsView(); 243 CreateWebContentsView();
245 244
246 GURL data_url = GURL("data:text/html;charset=utf-8," + 245 GURL data_url = GURL("data:text/html;charset=utf-8," +
247 net::EscapePath(delegate_->GetHTMLContents())); 246 net::EscapePath(delegate_->GetHTMLContents()));
248 frame_tree_.root()->current_frame_host()->NavigateToInterstitialURL(data_url); 247 frame_tree_.root()->current_frame_host()->NavigateToInterstitialURL(data_url);
249 frame_tree_.root()->current_frame_host()->SetAccessibilityMode( 248 frame_tree_.root()->current_frame_host()->SetAccessibilityMode(
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 FROM_HERE, base::Bind(&InterstitialPageImpl::Shutdown, 294 FROM_HERE, base::Bind(&InterstitialPageImpl::Shutdown,
296 weak_ptr_factory_.GetWeakPtr())); 295 weak_ptr_factory_.GetWeakPtr()));
297 render_view_host_ = NULL; 296 render_view_host_ = NULL;
298 frame_tree_.root()->ResetForNewProcess(); 297 frame_tree_.root()->ResetForNewProcess();
299 controller_->delegate()->DetachInterstitialPage(); 298 controller_->delegate()->DetachInterstitialPage();
300 // Let's revert to the original title if necessary. 299 // Let's revert to the original title if necessary.
301 NavigationEntry* entry = controller_->GetVisibleEntry(); 300 NavigationEntry* entry = controller_->GetVisibleEntry();
302 if (entry && !new_navigation_ && should_revert_web_contents_title_) 301 if (entry && !new_navigation_ && should_revert_web_contents_title_)
303 web_contents_->UpdateTitleForEntry(entry, original_web_contents_title_); 302 web_contents_->UpdateTitleForEntry(entry, original_web_contents_title_);
304 303
305 static_cast<WebContentsImpl*>(web_contents_)->DidChangeVisibleSecurityState(); 304 static_cast<WebContentsImpl*>(web_contents_)->DidChangeVisibleSSLState();
306 305
307 InterstitialPageMap::iterator iter = 306 InterstitialPageMap::iterator iter =
308 g_web_contents_to_interstitial_page->find(web_contents_); 307 g_web_contents_to_interstitial_page->find(web_contents_);
309 DCHECK(iter != g_web_contents_to_interstitial_page->end()); 308 DCHECK(iter != g_web_contents_to_interstitial_page->end());
310 if (iter != g_web_contents_to_interstitial_page->end()) 309 if (iter != g_web_contents_to_interstitial_page->end())
311 g_web_contents_to_interstitial_page->erase(iter); 310 g_web_contents_to_interstitial_page->erase(iter);
312 311
313 // Clear the WebContents pointer, because it may now be deleted. 312 // Clear the WebContents pointer, because it may now be deleted.
314 // This signifies that we are in the process of shutting down. 313 // This signifies that we are in the process of shutting down.
315 web_contents_ = NULL; 314 web_contents_ = NULL;
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) { 953 void InterstitialPageImpl::UpdateDeviceScaleFactor(double device_scale_factor) {
955 WebContentsImpl* web_contents_impl = 954 WebContentsImpl* web_contents_impl =
956 static_cast<WebContentsImpl*>(web_contents_); 955 static_cast<WebContentsImpl*>(web_contents_);
957 if (!web_contents_impl) 956 if (!web_contents_impl)
958 return; 957 return;
959 958
960 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor); 959 web_contents_impl->UpdateDeviceScaleFactor(device_scale_factor);
961 } 960 }
962 961
963 } // namespace content 962 } // namespace content
OLDNEW
« no previous file with comments | « components/web_contents_delegate_android/web_contents_delegate_android.cc ('k') | content/browser/ssl/ssl_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698