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

Side by Side Diff: chrome/browser/ui/webui/interstitials/interstitial_ui.cc

Issue 505913002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add {} 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 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 "chrome/browser/ui/webui/interstitials/interstitial_ui.h" 5 #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" 10 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 content::NavigationController* controller = 117 content::NavigationController* controller =
118 &web_contents->GetController(); 118 &web_contents->GetController();
119 controller->DiscardNonCommittedEntries(); 119 controller->DiscardNonCommittedEntries();
120 } 120 }
121 } 121 }
122 SafeBrowsingBlockingPage::UnsafeResource resource; 122 SafeBrowsingBlockingPage::UnsafeResource resource;
123 resource.url = request_url; 123 resource.url = request_url;
124 resource.threat_type = threat_type; 124 resource.threat_type = threat_type;
125 // Create a blocking page without showing the interstitial. 125 // Create a blocking page without showing the interstitial.
126 return SafeBrowsingBlockingPage::CreateBlockingPage( 126 return SafeBrowsingBlockingPage::CreateBlockingPage(
127 g_browser_process->safe_browsing_service()->ui_manager(), 127 g_browser_process->safe_browsing_service()->ui_manager().get(),
128 web_contents, 128 web_contents,
129 resource); 129 resource);
130 } 130 }
131 131
132 } // namespace 132 } // namespace
133 133
134 InterstitialUI::InterstitialUI(content::WebUI* web_ui) 134 InterstitialUI::InterstitialUI(content::WebUI* web_ui)
135 : WebUIController(web_ui) { 135 : WebUIController(web_ui) {
136 Profile* profile = Profile::FromWebUI(web_ui); 136 Profile* profile = Profile::FromWebUI(web_ui);
137 scoped_ptr<InterstitialHTMLSource> html_source( 137 scoped_ptr<InterstitialHTMLSource> html_source(
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 "<a href='safebrowsing?type=clientside_malware'>" 199 "<a href='safebrowsing?type=clientside_malware'>"
200 " Client Side Malware</a><br>" 200 " Client Side Malware</a><br>"
201 "<a href='safebrowsing?type=clientside_phishing'>" 201 "<a href='safebrowsing?type=clientside_phishing'>"
202 " Client Side Phishing</a><br>" 202 " Client Side Phishing</a><br>"
203 "</body></html>"; 203 "</body></html>";
204 } 204 }
205 scoped_refptr<base::RefCountedString> html_bytes = new base::RefCountedString; 205 scoped_refptr<base::RefCountedString> html_bytes = new base::RefCountedString;
206 html_bytes->data().assign(html.begin(), html.end()); 206 html_bytes->data().assign(html.begin(), html.end());
207 callback.Run(html_bytes.get()); 207 callback.Run(html_bytes.get());
208 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698