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

Side by Side Diff: chrome/browser/ui/gtk/first_run_dialog.cc

Issue 6927022: Turn off the search engine selector for the Russian locale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/gtk/first_run_dialog.h" 5 #include "chrome/browser/ui/gtk/first_run_dialog.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 } // namespace first_run 101 } // namespace first_run
102 102
103 // static 103 // static
104 bool FirstRunDialog::Show(Profile* profile, 104 bool FirstRunDialog::Show(Profile* profile,
105 bool randomize_search_engine_order) { 105 bool randomize_search_engine_order) {
106 // Figure out which dialogs we will show. 106 // Figure out which dialogs we will show.
107 // If the default search is managed via policy, we won't ask. 107 // If the default search is managed via policy, we won't ask.
108 const TemplateURLModel* search_engines_model = profile->GetTemplateURLModel(); 108 const TemplateURLModel* search_engines_model = profile->GetTemplateURLModel();
109 bool show_search_engines_dialog = search_engines_model && 109 bool show_search_engines_dialog =
110 !FirstRun::SearchEngineSelectorDisallowed() &&
111 search_engines_model &&
110 !search_engines_model->is_default_search_managed(); 112 !search_engines_model->is_default_search_managed();
111 113
112 #if defined(GOOGLE_CHROME_BUILD) 114 #if defined(GOOGLE_CHROME_BUILD)
113 // If the metrics reporting is managed, we won't ask. 115 // If the metrics reporting is managed, we won't ask.
114 const PrefService::Preference* metrics_reporting_pref = 116 const PrefService::Preference* metrics_reporting_pref =
115 g_browser_process->local_state()->FindPreference( 117 g_browser_process->local_state()->FindPreference(
116 prefs::kMetricsReportingEnabled); 118 prefs::kMetricsReportingEnabled);
117 bool show_reporting_dialog = !metrics_reporting_pref || 119 bool show_reporting_dialog = !metrics_reporting_pref ||
118 !metrics_reporting_pref->IsManaged(); 120 !metrics_reporting_pref->IsManaged();
119 #else 121 #else
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } 428 }
427 429
428 void FirstRunDialog::FirstRunDone() { 430 void FirstRunDialog::FirstRunDone() {
429 FirstRun::SetShowWelcomePagePref(); 431 FirstRun::SetShowWelcomePagePref();
430 432
431 if (dialog_) 433 if (dialog_)
432 gtk_widget_destroy(dialog_); 434 gtk_widget_destroy(dialog_);
433 MessageLoop::current()->Quit(); 435 MessageLoop::current()->Quit();
434 delete this; 436 delete this;
435 } 437 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/first_run_dialog.mm ('k') | chrome/browser/ui/views/first_run_search_engine_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698