| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 if (!local_state_file_exists && | 265 if (!local_state_file_exists && |
| 266 parsed_command_line.HasSwitch(switches::kParentProfile)) { | 266 parsed_command_line.HasSwitch(switches::kParentProfile)) { |
| 267 base::FilePath parent_profile = | 267 base::FilePath parent_profile = |
| 268 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); | 268 parsed_command_line.GetSwitchValuePath(switches::kParentProfile); |
| 269 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple(); | 269 scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple(); |
| 270 scoped_ptr<PrefService> parent_local_state( | 270 scoped_ptr<PrefService> parent_local_state( |
| 271 chrome_prefs::CreateLocalState( | 271 chrome_prefs::CreateLocalState( |
| 272 parent_profile, | 272 parent_profile, |
| 273 local_state_task_runner, | 273 local_state_task_runner, |
| 274 g_browser_process->policy_service(), | 274 g_browser_process->policy_service(), |
| 275 NULL, | |
| 276 registry, | 275 registry, |
| 277 false)); | 276 false)); |
| 278 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); | 277 registry->RegisterStringPref(prefs::kApplicationLocale, std::string()); |
| 279 // Right now, we only inherit the locale setting from the parent profile. | 278 // Right now, we only inherit the locale setting from the parent profile. |
| 280 local_state->SetString( | 279 local_state->SetString( |
| 281 prefs::kApplicationLocale, | 280 prefs::kApplicationLocale, |
| 282 parent_local_state->GetString(prefs::kApplicationLocale)); | 281 parent_local_state->GetString(prefs::kApplicationLocale)); |
| 283 } | 282 } |
| 284 | 283 |
| 285 #if defined(OS_CHROMEOS) | 284 #if defined(OS_CHROMEOS) |
| (...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 chromeos::CrosSettings::Shutdown(); | 1688 chromeos::CrosSettings::Shutdown(); |
| 1690 #endif | 1689 #endif |
| 1691 #endif | 1690 #endif |
| 1692 } | 1691 } |
| 1693 | 1692 |
| 1694 // Public members: | 1693 // Public members: |
| 1695 | 1694 |
| 1696 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1695 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1697 chrome_extra_parts_.push_back(parts); | 1696 chrome_extra_parts_.push_back(parts); |
| 1698 } | 1697 } |
| OLD | NEW |