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 "chrome/browser/first_run.h" | 5 #include "chrome/browser/first_run.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlcom.h> | 8 #include <atlcom.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <shellapi.h> | 10 #include <shellapi.h> |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 import_cmd.AppendSwitchWithValue( | 516 import_cmd.AppendSwitchWithValue( |
517 switches::kUserDataDir, | 517 switches::kUserDataDir, |
518 cmdline.GetSwitchValue(switches::kUserDataDir)); | 518 cmdline.GetSwitchValue(switches::kUserDataDir)); |
519 } | 519 } |
520 | 520 |
521 // Since ImportSettings is called before the local state is stored on disk | 521 // Since ImportSettings is called before the local state is stored on disk |
522 // we pass the language as an argument. GetApplicationLocale checks the | 522 // we pass the language as an argument. GetApplicationLocale checks the |
523 // current command line as fallback. | 523 // current command line as fallback. |
524 import_cmd.AppendSwitchWithValue( | 524 import_cmd.AppendSwitchWithValue( |
525 switches::kLang, | 525 switches::kLang, |
526 g_browser_process->GetApplicationLocale()); | 526 ASCIIToWide(g_browser_process->GetApplicationLocale())); |
527 | 527 |
528 import_cmd.CommandLine::AppendSwitchWithValue(switches::kImport, | 528 import_cmd.CommandLine::AppendSwitchWithValue(switches::kImport, |
529 EncodeImportParams(browser_type, items_to_import, parent_window)); | 529 EncodeImportParams(browser_type, items_to_import, parent_window)); |
530 | 530 |
531 // Time to launch the process that is going to do the import. | 531 // Time to launch the process that is going to do the import. |
532 base::ProcessHandle import_process; | 532 base::ProcessHandle import_process; |
533 if (!base::LaunchApp(import_cmd, false, false, &import_process)) | 533 if (!base::LaunchApp(import_cmd, false, false, &import_process)) |
534 return false; | 534 return false; |
535 | 535 |
536 // Activate the importer monitor. It awakes periodically in another thread | 536 // Activate the importer monitor. It awakes periodically in another thread |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 | 866 |
867 DISALLOW_COPY_AND_ASSIGN(TryChromeDialog); | 867 DISALLOW_COPY_AND_ASSIGN(TryChromeDialog); |
868 }; | 868 }; |
869 | 869 |
870 } // namespace | 870 } // namespace |
871 | 871 |
872 Upgrade::TryResult Upgrade::ShowTryChromeDialog() { | 872 Upgrade::TryResult Upgrade::ShowTryChromeDialog() { |
873 TryChromeDialog td; | 873 TryChromeDialog td; |
874 return td.ShowModal(); | 874 return td.ShowModal(); |
875 } | 875 } |
OLD | NEW |