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

Unified Diff: chrome/browser/first_run/first_run_mac.mm

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/first_run/first_run.cc ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run_mac.mm
===================================================================
--- chrome/browser/first_run/first_run_mac.mm (revision 63018)
+++ chrome/browser/first_run/first_run_mac.mm (working copy)
@@ -9,6 +9,8 @@
#import "chrome/browser/cocoa/first_run_dialog.h"
#import "chrome/browser/cocoa/search_engine_dialog_controller.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profile.h"
+#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/common/pref_names.h"
#include "chrome/installer/util/google_update_constants.h"
@@ -71,7 +73,12 @@
FirstRun::CreateSentinel();
// Set preference to show first run bubble and welcome page.
- FirstRun::SetShowFirstRunBubblePref(true);
+ // 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);
+ }
FirstRun::SetShowWelcomePagePref();
}
@@ -80,8 +87,13 @@
// static
void FirstRun::ShowFirstRunDialog(Profile* profile,
bool randomize_search_engine_experiment) {
- ShowSearchEngineSelectionDialog(profile,
- randomize_search_engine_experiment);
+ // If the default search is not managed via policy, ask the user to
+ // choose a default.
+ TemplateURLModel* model = profile->GetTemplateURLModel();
+ if (model && !model->is_default_search_managed()) {
+ ShowSearchEngineSelectionDialog(profile,
+ randomize_search_engine_experiment);
+ }
ShowFirstRun(profile);
}
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698