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

Unified Diff: chrome/browser/views/first_run_view.cc

Issue 4244: Make Chrome default browser an opt-out instead of an opt-in on first run. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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/views/first_run_view.h ('k') | chrome/browser/views/first_run_view_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/first_run_view.cc
===================================================================
--- chrome/browser/views/first_run_view.cc (revision 2542)
+++ chrome/browser/views/first_run_view.cc (working copy)
@@ -13,6 +13,7 @@
#include "chrome/browser/user_metrics.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/resource_bundle.h"
+#include "chrome/views/checkbox.h"
#include "chrome/views/image_view.h"
#include "chrome/views/label.h"
#include "chrome/views/throbber.h"
@@ -55,6 +56,8 @@
using ChromeViews::Label;
using ChromeViews::Link;
+ default_browser_->SetIsSelected(true);
+
welcome_label_ = new Label(l10n_util::GetString(IDS_FIRSTRUN_DLG_TEXT));
welcome_label_->SetMultiLine(true);
welcome_label_->SetHorizontalAlignment(Label::ALIGN_LEFT);
@@ -147,19 +150,15 @@
pref_size.cx, pref_size.cy);
}
-std::wstring FirstRunView::GetDialogButtonLabel(DialogButton button) const {
- if (DIALOGBUTTON_OK == button)
- return l10n_util::GetString(IDS_FIRSTRUN_DLG_OK);
- // The other buttons get the default text.
- return std::wstring();
-}
-
void FirstRunView::OpenCustomizeDialog() {
// The customize dialog now owns the importer host object.
ChromeViews::Window::CreateChromeWindow(
window()->GetHWND(),
gfx::Rect(),
- new FirstRunCustomizeView(profile_, importer_host_, this))->Show();
+ new FirstRunCustomizeView(profile_,
+ importer_host_,
+ this,
+ default_browser_->IsSelected()))->Show();
}
void FirstRunView::LinkActivated(ChromeViews::Link* source, int event_flags) {
@@ -182,6 +181,8 @@
customize_link_->SetEnabled(false);
CreateDesktopShortcut();
CreateQuickLaunchShortcut();
+ if (default_browser_->IsSelected())
+ SetDefaultBrowser();
// Index 0 is the default browser.
FirstRun::ImportSettings(profile_, 0, GetDefaultImportItems(),
window()->GetHWND());
« no previous file with comments | « chrome/browser/views/first_run_view.h ('k') | chrome/browser/views/first_run_view_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698