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/first_run/first_run.h" | 5 #include "chrome/browser/first_run/first_run.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 | 10 |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 } | 441 } |
442 } | 442 } |
443 | 443 |
444 if (out_prefs->do_import_items || !import_bookmarks_path.empty()) { | 444 if (out_prefs->do_import_items || !import_bookmarks_path.empty()) { |
445 // There is something to import from the default browser. This launches | 445 // There is something to import from the default browser. This launches |
446 // the importer process and blocks until done or until it fails. | 446 // the importer process and blocks until done or until it fails. |
447 scoped_refptr<ImporterList> importer_list(new ImporterList(NULL)); | 447 scoped_refptr<ImporterList> importer_list(new ImporterList(NULL)); |
448 importer_list->DetectSourceProfilesHack(); | 448 importer_list->DetectSourceProfilesHack(); |
449 if (!ImportSettingsWin( | 449 if (!ImportSettingsWin( |
450 NULL, importer_list->GetSourceProfileAt(0).importer_type, | 450 NULL, importer_list->GetSourceProfileAt(0).importer_type, |
451 out_prefs->do_import_items, base::FilePath::FromWStringHack(UTF8ToWide( | 451 out_prefs->do_import_items, |
452 import_bookmarks_path)), true)) { | 452 base::FilePath::FromWStringHack( |
| 453 base::UTF8ToWide(import_bookmarks_path)), true)) { |
453 LOG(WARNING) << "silent import failed"; | 454 LOG(WARNING) << "silent import failed"; |
454 } | 455 } |
455 } | 456 } |
456 } | 457 } |
457 | 458 |
458 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs) { | 459 bool ShowPostInstallEULAIfNeeded(installer::MasterPreferences* install_prefs) { |
459 if (IsEULANotAccepted(install_prefs)) { | 460 if (IsEULANotAccepted(install_prefs)) { |
460 // Show the post-installation EULA. This is done by setup.exe and the | 461 // Show the post-installation EULA. This is done by setup.exe and the |
461 // result determines if we continue or not. We wait here until the user | 462 // result determines if we continue or not. We wait here until the user |
462 // dismisses the dialog. | 463 // dismisses the dialog. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 | 504 |
504 base::FilePath MasterPrefsPath() { | 505 base::FilePath MasterPrefsPath() { |
505 // The standard location of the master prefs is next to the chrome binary. | 506 // The standard location of the master prefs is next to the chrome binary. |
506 base::FilePath master_prefs; | 507 base::FilePath master_prefs; |
507 if (!PathService::Get(base::DIR_EXE, &master_prefs)) | 508 if (!PathService::Get(base::DIR_EXE, &master_prefs)) |
508 return base::FilePath(); | 509 return base::FilePath(); |
509 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); | 510 return master_prefs.AppendASCII(installer::kDefaultMasterPrefs); |
510 } | 511 } |
511 | 512 |
512 } // namespace first_run | 513 } // namespace first_run |
OLD | NEW |