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

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc

Issue 7574021: Remove frontend code that allows for dynamic profile setting, and read the profile off the browse... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/views/autocomplete/autocomplete_popup_contents_view.cc
===================================================================
--- chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc (revision 95527)
+++ chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc (working copy)
@@ -229,11 +229,11 @@
const gfx::Font& font,
OmniboxView* omnibox_view,
AutocompleteEditModel* edit_model,
- Profile* profile,
const views::View* location_bar)
- : model_(new AutocompletePopupModel(this, edit_model, profile)),
+ : model_(new AutocompletePopupModel(this, edit_model)),
opt_in_view_(NULL),
omnibox_view_(omnibox_view),
+ profile_(edit_model->profile()),
location_bar_(location_bar),
result_font_(font.DeriveFont(kEditFontAdjust)),
result_bold_font_(result_font_.DeriveFont(0, gfx::Font::BOLD)),
@@ -331,7 +331,7 @@
for (size_t i = model_->result().size(); i < child_rv_count; ++i)
child_at(i)->SetVisible(false);
- PromoCounter* counter = model_->profile()->GetInstantPromoCounter();
+ PromoCounter* counter = profile_->GetInstantPromoCounter();
if (!opt_in_view_ && counter && counter->ShouldShow(base::Time::Now())) {
opt_in_view_ = new InstantOptInView(this, result_bold_font_, result_font_);
AddChildView(opt_in_view_);
@@ -694,12 +694,12 @@
void AutocompletePopupContentsView::UserPressedOptIn(bool opt_in) {
delete opt_in_view_;
opt_in_view_ = NULL;
- PromoCounter* counter = model_->profile()->GetInstantPromoCounter();
+ PromoCounter* counter = profile_->GetInstantPromoCounter();
DCHECK(counter);
counter->Hide();
if (opt_in) {
browser::ShowInstantConfirmDialogIfNecessary(
- location_bar_->GetWidget()->GetNativeWindow(), model_->profile());
+ location_bar_->GetWidget()->GetNativeWindow(), profile_);
}
UpdatePopupAppearance();
}

Powered by Google App Engine
This is Rietveld 408576698