OLD | NEW |
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 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 // SkBitmaps from the ResourceBundle. | 565 // SkBitmaps from the ResourceBundle. |
566 ResourceBundle::CleanupSharedInstance(); | 566 ResourceBundle::CleanupSharedInstance(); |
567 } | 567 } |
568 | 568 |
569 if (!new_user_data_dir.empty()) { | 569 if (!new_user_data_dir.empty()) { |
570 // Because of the way CommandLine parses, it's sufficient to append a new | 570 // Because of the way CommandLine parses, it's sufficient to append a new |
571 // --user-data-dir switch. The last flag of the same name wins. | 571 // --user-data-dir switch. The last flag of the same name wins. |
572 // TODO(tc): It would be nice to remove the flag we don't want, but that | 572 // TODO(tc): It would be nice to remove the flag we don't want, but that |
573 // sounds risky if we parse differently than CommandLineToArgvW. | 573 // sounds risky if we parse differently than CommandLineToArgvW. |
574 CommandLine new_command_line = parameters.command_line_; | 574 CommandLine new_command_line = parameters.command_line_; |
575 new_command_line.AppendSwitchWithValue(switches::kUserDataDir, | 575 new_command_line.AppendSwitchPath(switches::kUserDataDir, |
576 new_user_data_dir.ToWStringHack()); | 576 new_user_data_dir); |
577 base::LaunchApp(new_command_line, false, false, NULL); | 577 base::LaunchApp(new_command_line, false, false, NULL); |
578 } | 578 } |
579 #else | 579 #else |
580 // TODO(port): fix this. See comments near the definition of | 580 // TODO(port): fix this. See comments near the definition of |
581 // user_data_dir. It is better to CHECK-fail here than it is to | 581 // user_data_dir. It is better to CHECK-fail here than it is to |
582 // silently exit because of missing code in the above test. | 582 // silently exit because of missing code in the above test. |
583 CHECK(profile) << "Cannot get default profile."; | 583 CHECK(profile) << "Cannot get default profile."; |
584 #endif | 584 #endif |
585 | 585 |
586 return NULL; | 586 return NULL; |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 | 1265 |
1266 metrics->Stop(); | 1266 metrics->Stop(); |
1267 | 1267 |
1268 // browser_shutdown takes care of deleting browser_process, so we need to | 1268 // browser_shutdown takes care of deleting browser_process, so we need to |
1269 // release it. | 1269 // release it. |
1270 ignore_result(browser_process.release()); | 1270 ignore_result(browser_process.release()); |
1271 browser_shutdown::Shutdown(); | 1271 browser_shutdown::Shutdown(); |
1272 | 1272 |
1273 return result_code; | 1273 return result_code; |
1274 } | 1274 } |
OLD | NEW |