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

Unified Diff: chrome/browser/ui/views/toolbar_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
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/ui/views/toolbar_view.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698