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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 8198007: Remove PrefService::ScheduleSavePersistentPrefs and SavePersistentPrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 12 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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 366 }
367 367
368 #if defined(OS_CHROMEOS) 368 #if defined(OS_CHROMEOS)
369 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { 369 if (parsed_command_line.HasSwitch(switches::kLoginManager)) {
370 std::string owner_locale = local_state->GetString(prefs::kOwnerLocale); 370 std::string owner_locale = local_state->GetString(prefs::kOwnerLocale);
371 // Ensure that we start with owner's locale. 371 // Ensure that we start with owner's locale.
372 if (!owner_locale.empty() && 372 if (!owner_locale.empty() &&
373 local_state->GetString(prefs::kApplicationLocale) != owner_locale && 373 local_state->GetString(prefs::kApplicationLocale) != owner_locale &&
374 !local_state->IsManagedPreference(prefs::kApplicationLocale)) { 374 !local_state->IsManagedPreference(prefs::kApplicationLocale)) {
375 local_state->SetString(prefs::kApplicationLocale, owner_locale); 375 local_state->SetString(prefs::kApplicationLocale, owner_locale);
376 local_state->ScheduleSavePersistentPrefs();
377 } 376 }
378 } 377 }
379 #endif 378 #endif
380 379
381 return local_state; 380 return local_state;
382 } 381 }
383 382
384 // Initializes the profile, possibly doing some user prompting to pick a 383 // Initializes the profile, possibly doing some user prompting to pick a
385 // fallback profile. Returns the newly created profile, or NULL if startup 384 // fallback profile. Returns the newly created profile, or NULL if startup
386 // should not continue. 385 // should not continue.
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 if (base::win::GetVersion() <= base::win::VERSION_XP) 1981 if (base::win::GetVersion() <= base::win::VERSION_XP)
1983 uma_name += "_XP"; 1982 uma_name += "_XP";
1984 1983
1985 uma_name += "_PreRead"; 1984 uma_name += "_PreRead";
1986 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 1985 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
1987 AddPreReadHistogramTime(uma_name.c_str(), time); 1986 AddPreReadHistogramTime(uma_name.c_str(), time);
1988 } 1987 }
1989 #endif 1988 #endif
1990 #endif 1989 #endif
1991 } 1990 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_shutdown.cc ('k') | chrome/browser/chromeos/accessibility/accessibility_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698