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

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

Issue 6894020: Adds async interface method to PersistentPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: prevent multiple calls when failed 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/browser_main.h" 5 #include "chrome/browser/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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 // Checking that the local state file for the current profile doesn't exist 714 // Checking that the local state file for the current profile doesn't exist
715 // is the most robust way to determine whether we need to inherit or not 715 // is the most robust way to determine whether we need to inherit or not
716 // since the parent profile command line flag can be present even when the 716 // since the parent profile command line flag can be present even when the
717 // current profile is not a new one, and in that case we do not want to 717 // current profile is not a new one, and in that case we do not want to
718 // inherit and reset the user's setting. 718 // inherit and reset the user's setting.
719 if (!local_state_file_exists && 719 if (!local_state_file_exists &&
720 parsed_command_line.HasSwitch(switches::kParentProfile)) { 720 parsed_command_line.HasSwitch(switches::kParentProfile)) {
721 FilePath parent_profile = 721 FilePath parent_profile =
722 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); 722 parsed_command_line.GetSwitchValuePath(switches::kParentProfile);
723 scoped_ptr<PrefService> parent_local_state( 723 scoped_ptr<PrefService> parent_local_state(
724 PrefService::CreatePrefService(parent_profile, NULL, NULL)); 724 PrefService::CreatePrefService(parent_profile, NULL, NULL, false));
725 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, 725 parent_local_state->RegisterStringPref(prefs::kApplicationLocale,
726 std::string()); 726 std::string());
727 // Right now, we only inherit the locale setting from the parent profile. 727 // Right now, we only inherit the locale setting from the parent profile.
728 local_state->SetString( 728 local_state->SetString(
729 prefs::kApplicationLocale, 729 prefs::kApplicationLocale,
730 parent_local_state->GetString(prefs::kApplicationLocale)); 730 parent_local_state->GetString(prefs::kApplicationLocale));
731 } 731 }
732 732
733 #if defined(OS_CHROMEOS) 733 #if defined(OS_CHROMEOS)
734 if (parsed_command_line.HasSwitch(switches::kLoginManager)) { 734 if (parsed_command_line.HasSwitch(switches::kLoginManager)) {
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1908 #if defined(OS_CHROMEOS) 1908 #if defined(OS_CHROMEOS)
1909 // To be precise, logout (browser shutdown) is not yet done, but the 1909 // To be precise, logout (browser shutdown) is not yet done, but the
1910 // remaining work is negligible, hence we say LogoutDone here. 1910 // remaining work is negligible, hence we say LogoutDone here.
1911 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1911 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1912 false); 1912 false);
1913 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1913 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1914 #endif 1914 #endif
1915 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 1915 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
1916 return result_code; 1916 return result_code;
1917 } 1917 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_process_impl.cc » ('j') | chrome/browser/prefs/pref_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698