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

Unified Diff: chrome/browser/ui/webui/interstitials/interstitial_ui.cc

Issue 1053663003: Cleanup: Remove unused variables in chrome/ found by Scythe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/interstitials/interstitial_ui.cc
diff --git a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
index 31a98bef8aff9cee0d0c40c41c45fcc78fdbe507..f71f025747404ed21965cd4bf4d3ea24f05d87ff 100644
--- a/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
+++ b/chrome/browser/ui/webui/interstitials/interstitial_ui.cc
@@ -28,8 +28,7 @@ namespace {
class InterstitialHTMLSource : public content::URLDataSource {
public:
- InterstitialHTMLSource(Profile* profile,
- content::WebContents* web_contents);
+ explicit InterstitialHTMLSource(content::WebContents* web_contents);
~InterstitialHTMLSource() override;
// content::URLDataSource:
@@ -43,7 +42,6 @@ class InterstitialHTMLSource : public content::URLDataSource {
const content::URLDataSource::GotDataCallback& callback) override;
private:
- Profile* profile_;
content::WebContents* web_contents_;
DISALLOW_COPY_AND_ASSIGN(InterstitialHTMLSource);
};
@@ -145,10 +143,9 @@ SafeBrowsingBlockingPage* CreateSafeBrowsingBlockingPage(
InterstitialUI::InterstitialUI(content::WebUI* web_ui)
: WebUIController(web_ui) {
- Profile* profile = Profile::FromWebUI(web_ui);
scoped_ptr<InterstitialHTMLSource> html_source(
- new InterstitialHTMLSource(profile->GetOriginalProfile(),
- web_ui->GetWebContents()));
+ new InterstitialHTMLSource(web_ui->GetWebContents()));
+ Profile* profile = Profile::FromWebUI(web_ui);
content::URLDataSource::Add(profile, html_source.release());
}
@@ -158,10 +155,8 @@ InterstitialUI::~InterstitialUI() {
// InterstitialHTMLSource
InterstitialHTMLSource::InterstitialHTMLSource(
- Profile* profile,
content::WebContents* web_contents)
- : profile_(profile),
- web_contents_(web_contents) {
+ : web_contents_(web_contents) {
}
InterstitialHTMLSource::~InterstitialHTMLSource() {
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h ('k') | chrome/browser/ui/webui/ntp/thumbnail_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698