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

Unified Diff: chrome/browser/ui/views/first_run_bubble.cc

Issue 10830254: views: Pass only Browser pointer to FirstRunBubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nit Created 8 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/first_run_bubble.h ('k') | chrome/browser/ui/views/first_run_bubble_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/first_run_bubble.cc
diff --git a/chrome/browser/ui/views/first_run_bubble.cc b/chrome/browser/ui/views/first_run_bubble.cc
index 0d98e491fff6e73a961e921ffae419c80557653b..71c4284bc50aaa425901467c3584bdc5205a8aba 100644
--- a/chrome/browser/ui/views/first_run_bubble.cc
+++ b/chrome/browser/ui/views/first_run_bubble.cc
@@ -4,9 +4,9 @@
#include "chrome/browser/ui/views/first_run_bubble.h"
-#include "base/utf_string_conversions.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/search_engines/util.h"
+#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -26,16 +26,15 @@ const int kRightInset = 2;
} // namespace
namespace first_run {
- void ShowFirstRunDialog(Profile* profile) {}
+void ShowFirstRunDialog(Profile* profile) {}
} // namespace first_run
// static
FirstRunBubble* FirstRunBubble::ShowBubble(Browser* browser,
- Profile* profile,
views::View* anchor_view) {
first_run::LogFirstRunMetric(first_run::FIRST_RUN_BUBBLE_SHOWN);
- FirstRunBubble* delegate = new FirstRunBubble(browser, profile, anchor_view);
+ FirstRunBubble* delegate = new FirstRunBubble(browser, anchor_view);
views::BubbleDelegateView::CreateBubble(delegate);
delegate->StartFade(true);
return delegate;
@@ -46,7 +45,8 @@ void FirstRunBubble::Init() {
const gfx::Font& original_font = rb.GetFont(ui::ResourceBundle::MediumFont);
views::Label* title = new views::Label(l10n_util::GetStringFUTF16(
- IDS_FR_BUBBLE_TITLE, GetDefaultSearchEngineName(profile_)));
+ IDS_FR_BUBBLE_TITLE, browser_ ?
+ GetDefaultSearchEngineName(browser_->profile()) : string16()));
title->SetFont(original_font.DeriveFont(2, gfx::Font::BOLD));
views::Link* change =
@@ -85,12 +85,9 @@ gfx::Rect FirstRunBubble::GetAnchorRect() {
return rect;
}
-FirstRunBubble::FirstRunBubble(Browser* browser,
- Profile* profile,
- views::View* anchor_view)
+FirstRunBubble::FirstRunBubble(Browser* browser, views::View* anchor_view)
: views::BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_LEFT),
- browser_(browser),
- profile_(profile) {
+ browser_(browser) {
}
FirstRunBubble::~FirstRunBubble() {
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.h ('k') | chrome/browser/ui/views/first_run_bubble_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698