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

Side by Side Diff: chrome/browser/ui/search/instant_page.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, 8 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 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 "chrome/browser/ui/search/instant_page.h" 5 #include "chrome/browser/ui/search/instant_page.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/search/search.h" 8 #include "chrome/browser/search/search.h"
9 #include "chrome/browser/ui/search/search_model.h" 9 #include "chrome/browser/ui/search/search_model.h"
10 #include "chrome/browser/ui/search/search_tab_helper.h" 10 #include "chrome/browser/ui/search/search_tab_helper.h"
(...skipping 25 matching lines...) Expand all
36 36
37 const std::string& InstantPage::instant_url() const { 37 const std::string& InstantPage::instant_url() const {
38 return instant_url_; 38 return instant_url_;
39 } 39 }
40 40
41 bool InstantPage::IsLocal() const { 41 bool InstantPage::IsLocal() const {
42 return web_contents() && 42 return web_contents() &&
43 web_contents()->GetURL() == GURL(chrome::kChromeSearchLocalNtpUrl); 43 web_contents()->GetURL() == GURL(chrome::kChromeSearchLocalNtpUrl);
44 } 44 }
45 45
46 InstantPage::InstantPage(Delegate* delegate, const std::string& instant_url, 46 InstantPage::InstantPage(Delegate* delegate,
47 Profile* profile, bool is_incognito) 47 const std::string& instant_url,
48 Profile* profile)
48 : profile_(profile), 49 : profile_(profile),
49 delegate_(delegate), 50 delegate_(delegate),
50 instant_url_(instant_url), 51 instant_url_(instant_url) {
51 is_incognito_(is_incognito) {
52 } 52 }
53 53
54 void InstantPage::SetContents(content::WebContents* new_web_contents) { 54 void InstantPage::SetContents(content::WebContents* new_web_contents) {
55 ClearContents(); 55 ClearContents();
56 56
57 if (!new_web_contents) 57 if (!new_web_contents)
58 return; 58 return;
59 59
60 Observe(new_web_contents); 60 Observe(new_web_contents);
61 SearchModel* model = 61 SearchModel* model =
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 void InstantPage::ClearContents() { 97 void InstantPage::ClearContents() {
98 if (web_contents()) { 98 if (web_contents()) {
99 SearchTabHelper::FromWebContents(web_contents())->model()->RemoveObserver( 99 SearchTabHelper::FromWebContents(web_contents())->model()->RemoveObserver(
100 this); 100 this);
101 } 101 }
102 102
103 Observe(NULL); 103 Observe(NULL);
104 } 104 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/instant_page.h ('k') | chrome/browser/ui/search/instant_page_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698