OLD | NEW |
---|---|
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 "build/build_config.h" | 5 #include "build/build_config.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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
530 if (!user_data_dir.empty()) { | 530 if (!user_data_dir.empty()) { |
531 // Because of the way CommandLine parses, it's sufficient to append a new | 531 // Because of the way CommandLine parses, it's sufficient to append a new |
532 // --user-data-dir switch. The last flag of the same name wins. | 532 // --user-data-dir switch. The last flag of the same name wins. |
533 // TODO(tc): It would be nice to remove the flag we don't want, but that | 533 // TODO(tc): It would be nice to remove the flag we don't want, but that |
534 // sounds risky if we parse differently than CommandLineToArgvW. | 534 // sounds risky if we parse differently than CommandLineToArgvW. |
535 CommandLine new_command_line = parsed_command_line; | 535 CommandLine new_command_line = parsed_command_line; |
536 new_command_line.AppendSwitchWithValue(switches::kUserDataDir, | 536 new_command_line.AppendSwitchWithValue(switches::kUserDataDir, |
537 user_data_dir.ToWStringHack()); | 537 user_data_dir.ToWStringHack()); |
538 base::LaunchApp(new_command_line, false, false, NULL); | 538 base::LaunchApp(new_command_line, false, false, NULL); |
539 } | 539 } |
540 #endif // defined(OS_WIN) || defined(OS_LINUX) | |
540 | 541 |
541 return ResultCodes::NORMAL_EXIT; | 542 return ResultCodes::NORMAL_EXIT; |
542 #endif // defined(OS_WIN) || defined(OS_LINUX) | |
wtc
2009/08/15 00:22:38
An alternative is to add
+#else
+ return Resul
| |
543 } | 543 } |
544 | 544 |
545 PrefService* user_prefs = profile->GetPrefs(); | 545 PrefService* user_prefs = profile->GetPrefs(); |
546 DCHECK(user_prefs); | 546 DCHECK(user_prefs); |
547 | 547 |
548 // Now that local state and user prefs have been loaded, make the two pref | 548 // Now that local state and user prefs have been loaded, make the two pref |
549 // services aware of all our preferences. | 549 // services aware of all our preferences. |
550 browser::RegisterAllPrefs(user_prefs, local_state); | 550 browser::RegisterAllPrefs(user_prefs, local_state); |
551 | 551 |
552 // Now that all preferences have been registered, set the install date | 552 // Now that all preferences have been registered, set the install date |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
803 if (metrics) | 803 if (metrics) |
804 metrics->Stop(); | 804 metrics->Stop(); |
805 | 805 |
806 // browser_shutdown takes care of deleting browser_process, so we need to | 806 // browser_shutdown takes care of deleting browser_process, so we need to |
807 // release it. | 807 // release it. |
808 browser_process.release(); | 808 browser_process.release(); |
809 browser_shutdown::Shutdown(); | 809 browser_shutdown::Shutdown(); |
810 | 810 |
811 return result_code; | 811 return result_code; |
812 } | 812 } |
OLD | NEW |