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

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

Issue 375016: Use GetSwitchValuePath. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/plugin/plugin_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // If the local state file for the current profile doesn't exist and the 435 // If the local state file for the current profile doesn't exist and the
436 // parent profile command line flag is present, then we should inherit some 436 // parent profile command line flag is present, then we should inherit some
437 // local state from the parent profile. 437 // local state from the parent profile.
438 // Checking that the local state file for the current profile doesn't exist 438 // Checking that the local state file for the current profile doesn't exist
439 // is the most robust way to determine whether we need to inherit or not 439 // is the most robust way to determine whether we need to inherit or not
440 // since the parent profile command line flag can be present even when the 440 // since the parent profile command line flag can be present even when the
441 // current profile is not a new one, and in that case we do not want to 441 // current profile is not a new one, and in that case we do not want to
442 // inherit and reset the user's setting. 442 // inherit and reset the user's setting.
443 if (!local_state_file_exists && 443 if (!local_state_file_exists &&
444 parsed_command_line.HasSwitch(switches::kParentProfile)) { 444 parsed_command_line.HasSwitch(switches::kParentProfile)) {
445 FilePath parent_profile = FilePath::FromWStringHack( 445 FilePath parent_profile =
446 parsed_command_line.GetSwitchValue(switches::kParentProfile)); 446 parsed_command_line.GetSwitchValuePath(switches::kParentProfile);
447 PrefService parent_local_state(parent_profile); 447 PrefService parent_local_state(parent_profile);
448 parent_local_state.RegisterStringPref(prefs::kApplicationLocale, 448 parent_local_state.RegisterStringPref(prefs::kApplicationLocale,
449 std::wstring()); 449 std::wstring());
450 // Right now, we only inherit the locale setting from the parent profile. 450 // Right now, we only inherit the locale setting from the parent profile.
451 local_state->SetString( 451 local_state->SetString(
452 prefs::kApplicationLocale, 452 prefs::kApplicationLocale,
453 parent_local_state.GetString(prefs::kApplicationLocale)); 453 parent_local_state.GetString(prefs::kApplicationLocale));
454 } 454 }
455 455
456 // If we're running tests (ui_task is non-null), then the ResourceBundle 456 // If we're running tests (ui_task is non-null), then the ResourceBundle
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 if (metrics) 889 if (metrics)
890 metrics->Stop(); 890 metrics->Stop();
891 891
892 // browser_shutdown takes care of deleting browser_process, so we need to 892 // browser_shutdown takes care of deleting browser_process, so we need to
893 // release it. 893 // release it.
894 browser_process.release(); 894 browser_process.release();
895 browser_shutdown::Shutdown(); 895 browser_shutdown::Shutdown();
896 896
897 return result_code; 897 return result_code;
898 } 898 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/plugin/plugin_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698