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

Unified Diff: chrome/browser/first_run/first_run_win.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/first_run/first_run_mac.mm ('k') | chrome/browser/gtk/first_run_dialog.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run_win.cc
===================================================================
--- chrome/browser/first_run/first_run_win.cc (revision 63018)
+++ chrome/browser/first_run/first_run_win.cc (working copy)
@@ -31,6 +31,7 @@
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/process_singleton.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/views/first_run_search_engine_view.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/notification_service.h"
@@ -453,6 +454,12 @@
// static
void FirstRun::ShowFirstRunDialog(Profile* profile,
bool randomize_search_engine_experiment) {
+ // If the default search is managed via policy, we don't ask the user to
+ // choose.
+ TemplateURLModel* model = profile->GetTemplateURLModel();
+ if (NULL == model || model->is_default_search_managed())
+ return;
+
views::Window* search_engine_dialog = views::Window::CreateChromeWindow(
NULL,
gfx::Rect(),
« no previous file with comments | « chrome/browser/first_run/first_run_mac.mm ('k') | chrome/browser/gtk/first_run_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698