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

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

Issue 5646003: Sanitize PrefStore interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, fix up unit tests. Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 // Checking that the local state file for the current profile doesn't exist 621 // Checking that the local state file for the current profile doesn't exist
622 // is the most robust way to determine whether we need to inherit or not 622 // is the most robust way to determine whether we need to inherit or not
623 // since the parent profile command line flag can be present even when the 623 // since the parent profile command line flag can be present even when the
624 // current profile is not a new one, and in that case we do not want to 624 // current profile is not a new one, and in that case we do not want to
625 // inherit and reset the user's setting. 625 // inherit and reset the user's setting.
626 if (!local_state_file_exists && 626 if (!local_state_file_exists &&
627 parsed_command_line.HasSwitch(switches::kParentProfile)) { 627 parsed_command_line.HasSwitch(switches::kParentProfile)) {
628 FilePath parent_profile = 628 FilePath parent_profile =
629 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); 629 parsed_command_line.GetSwitchValuePath(switches::kParentProfile);
630 scoped_ptr<PrefService> parent_local_state( 630 scoped_ptr<PrefService> parent_local_state(
631 PrefService::CreatePrefService(parent_profile, NULL)); 631 PrefService::CreatePrefService(parent_profile, NULL, NULL));
632 parent_local_state->RegisterStringPref(prefs::kApplicationLocale, 632 parent_local_state->RegisterStringPref(prefs::kApplicationLocale,
633 std::string()); 633 std::string());
634 // Right now, we only inherit the locale setting from the parent profile. 634 // Right now, we only inherit the locale setting from the parent profile.
635 local_state->SetString( 635 local_state->SetString(
636 prefs::kApplicationLocale, 636 prefs::kApplicationLocale,
637 parent_local_state->GetString(prefs::kApplicationLocale)); 637 parent_local_state->GetString(prefs::kApplicationLocale));
638 } 638 }
639 639
640 return local_state; 640 return local_state;
641 } 641 }
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 #if defined(OS_CHROMEOS) 1696 #if defined(OS_CHROMEOS)
1697 // To be precise, logout (browser shutdown) is not yet done, but the 1697 // To be precise, logout (browser shutdown) is not yet done, but the
1698 // remaining work is negligible, hence we say LogoutDone here. 1698 // remaining work is negligible, hence we say LogoutDone here.
1699 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1699 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1700 false); 1700 false);
1701 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1701 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1702 #endif 1702 #endif
1703 TRACE_EVENT_END("BrowserMain", 0, 0); 1703 TRACE_EVENT_END("BrowserMain", 0, 0);
1704 return result_code; 1704 return result_code;
1705 } 1705 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_process_impl.cc » ('j') | chrome/browser/extensions/extension_pref_store.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698