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

Side by Side Diff: chrome/browser/first_run/first_run.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/first_run/first_run.h" 5 #include "chrome/browser/first_run/first_run.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 if (!local_state->FindPreference( 389 if (!local_state->FindPreference(
390 prefs::kAutofillPersonalDataManagerFirstRun)) { 390 prefs::kAutofillPersonalDataManagerFirstRun)) {
391 local_state->RegisterBooleanPref( 391 local_state->RegisterBooleanPref(
392 prefs::kAutofillPersonalDataManagerFirstRun, false); 392 prefs::kAutofillPersonalDataManagerFirstRun, false);
393 local_state->SetBoolean(prefs::kAutofillPersonalDataManagerFirstRun, true); 393 local_state->SetBoolean(prefs::kAutofillPersonalDataManagerFirstRun, true);
394 } 394 }
395 return true; 395 return true;
396 } 396 }
397 397
398 // static 398 // static
399 bool FirstRun::SearchEngineSelectorRestricted() {
400 // For now, the only case in which the search engine dialog should never be
401 // shown is if the locale is Russia.
402 std::string locale = g_browser_process->GetApplicationLocale();
403 return (locale == "ru");
404 }
405
406 // static
399 bool FirstRun::SetOEMFirstRunBubblePref() { 407 bool FirstRun::SetOEMFirstRunBubblePref() {
400 PrefService* local_state = g_browser_process->local_state(); 408 PrefService* local_state = g_browser_process->local_state();
401 if (!local_state) 409 if (!local_state)
402 return false; 410 return false;
403 if (!local_state->FindPreference(prefs::kShouldUseOEMFirstRunBubble)) { 411 if (!local_state->FindPreference(prefs::kShouldUseOEMFirstRunBubble)) {
404 local_state->RegisterBooleanPref(prefs::kShouldUseOEMFirstRunBubble, 412 local_state->RegisterBooleanPref(prefs::kShouldUseOEMFirstRunBubble,
405 false); 413 false);
406 local_state->SetBoolean(prefs::kShouldUseOEMFirstRunBubble, true); 414 local_state->SetBoolean(prefs::kShouldUseOEMFirstRunBubble, true);
407 } 415 }
408 return true; 416 return true;
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 if (!observer->ended()) { 647 if (!observer->ended()) {
640 observer->set_should_quit_message_loop(); 648 observer->set_should_quit_message_loop();
641 MessageLoop::current()->Run(); 649 MessageLoop::current()->Run();
642 } 650 }
643 651
644 // Unfortunately there's no success/fail signal in ImporterHost. 652 // Unfortunately there's no success/fail signal in ImporterHost.
645 return true; 653 return true;
646 } 654 }
647 655
648 #endif // OS_POSIX 656 #endif // OS_POSIX
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698