| Index: chrome/browser/ui/views/toolbar_view.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/toolbar_view.cc (revision 95527)
|
| +++ chrome/browser/ui/views/toolbar_view.cc (working copy)
|
| @@ -87,7 +87,6 @@
|
| location_bar_(NULL),
|
| browser_actions_(NULL),
|
| app_menu_(NULL),
|
| - profile_(NULL),
|
| browser_(browser),
|
| profiles_menu_contents_(NULL) {
|
| set_id(VIEW_ID_TOOLBAR);
|
| @@ -117,7 +116,7 @@
|
| // already gone.
|
| }
|
|
|
| -void ToolbarView::Init(Profile* profile) {
|
| +void ToolbarView::Init() {
|
| back_menu_model_.reset(new BackForwardMenuModel(
|
| browser_, BackForwardMenuModel::BACKWARD_MENU));
|
| forward_menu_model_.reset(new BackForwardMenuModel(
|
| @@ -144,8 +143,8 @@
|
| forward_->set_id(VIEW_ID_FORWARD_BUTTON);
|
|
|
| // Have to create this before |reload_| as |reload_|'s constructor needs it.
|
| - location_bar_ = new LocationBarView(profile, browser_,
|
| - model_, this, (display_mode_ == DISPLAYMODE_LOCATION) ?
|
| + location_bar_ = new LocationBarView(browser_, model_, this,
|
| + (display_mode_ == DISPLAYMODE_LOCATION) ?
|
| LocationBarView::POPUP : LocationBarView::NORMAL);
|
|
|
| reload_ = new ReloadButton(location_bar_, browser_);
|
| @@ -197,11 +196,10 @@
|
| AddChildView(app_menu_);
|
|
|
| location_bar_->Init();
|
| - show_home_button_.Init(prefs::kShowHomeButton, profile->GetPrefs(), this);
|
| + show_home_button_.Init(prefs::kShowHomeButton,
|
| + browser_->profile()->GetPrefs(), this);
|
| browser_actions_->Init();
|
|
|
| - SetProfile(profile);
|
| -
|
| // Accessibility specific tooltip text.
|
| if (BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) {
|
| back_->SetTooltipText(
|
| @@ -211,13 +209,6 @@
|
| }
|
| }
|
|
|
| -void ToolbarView::SetProfile(Profile* profile) {
|
| - if (profile != profile_) {
|
| - profile_ = profile;
|
| - location_bar_->SetProfile(profile);
|
| - }
|
| -}
|
| -
|
| void ToolbarView::Update(TabContents* tab, bool should_restore_state) {
|
| if (location_bar_)
|
| location_bar_->Update(should_restore_state ? tab : NULL);
|
|
|