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

Unified Diff: chrome/browser/first_run/first_run.cc

Issue 3847006: If default search is managed, we should not asked the user to choose it at Fi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 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/browser_main.cc ('k') | chrome/browser/first_run/first_run_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run.cc
===================================================================
--- chrome/browser/first_run/first_run.cc (revision 63018)
+++ chrome/browser/first_run/first_run.cc (working copy)
@@ -22,6 +22,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profile_manager.h"
+#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -564,7 +565,7 @@
UserMetrics::RecordAction(UserMetricsAction("FirstRunDef_Accept"));
// Launch the search engine dialog only if build is organic, and user has not
- // already set search preferences.
+ // already set preferences.
if (IsOrganic() && !local_state_file_exists) {
// The home page string may be set in the preferences, but the user should
// initially use Chrome with the NTP as home page in organic builds.
@@ -575,9 +576,14 @@
if (make_chrome_default)
ShellIntegration::SetAsDefaultBrowser();
- FirstRun::SetShowFirstRunBubblePref(true);
- // Set the first run bubble to minimal.
- FirstRun::SetMinimalFirstRunBubblePref();
+ // Don't display the minimal bubble if there is no default search provider.
+ TemplateURLModel* search_engines_model = profile->GetTemplateURLModel();
+ if (search_engines_model &&
+ search_engines_model->GetDefaultSearchProvider()) {
+ FirstRun::SetShowFirstRunBubblePref(true);
+ // Set the first run bubble to minimal.
+ FirstRun::SetMinimalFirstRunBubblePref();
+ }
FirstRun::SetShowWelcomePagePref();
FirstRun::SetPersonalDataManagerFirstRunPref();
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | chrome/browser/first_run/first_run_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698