| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 profile->GetPrefs()->ReloadPersistentPrefs(); | 390 profile->GetPrefs()->ReloadPersistentPrefs(); |
| 391 | 391 |
| 392 return (import_runner.exit_code() == content::RESULT_CODE_NORMAL_EXIT); | 392 return (import_runner.exit_code() == content::RESULT_CODE_NORMAL_EXIT); |
| 393 } | 393 } |
| 394 | 394 |
| 395 } // namespace | 395 } // namespace |
| 396 | 396 |
| 397 namespace first_run { | 397 namespace first_run { |
| 398 namespace internal { | 398 namespace internal { |
| 399 | 399 |
| 400 void DoPostImportPlatformSpecificTasks() { | 400 void DoPostImportPlatformSpecificTasks(Profile* /* profile */) { |
| 401 // Trigger the Active Setup command for system-level Chromes to finish | 401 // Trigger the Active Setup command for system-level Chromes to finish |
| 402 // configuring this user's install (e.g. per-user shortcuts). | 402 // configuring this user's install (e.g. per-user shortcuts). |
| 403 // Delay the task slightly to give Chrome launch I/O priority while also | 403 // Delay the task slightly to give Chrome launch I/O priority while also |
| 404 // making sure shortcuts are created promptly to avoid annoying the user by | 404 // making sure shortcuts are created promptly to avoid annoying the user by |
| 405 // re-creating shortcuts he previously deleted. | 405 // re-creating shortcuts he previously deleted. |
| 406 static const int64 kTiggerActiveSetupDelaySeconds = 5; | 406 static const int64 kTiggerActiveSetupDelaySeconds = 5; |
| 407 base::FilePath chrome_exe; | 407 base::FilePath chrome_exe; |
| 408 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { | 408 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { |
| 409 NOTREACHED(); | 409 NOTREACHED(); |
| 410 } else if (!InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())) { | 410 } else if (!InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())) { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); | 516 int return_code = internal::ImportBookmarkFromFileIfNeeded(profile, cmdline); |
| 517 #if !defined(USE_AURA) | 517 #if !defined(USE_AURA) |
| 518 if (cmdline.HasSwitch(switches::kImport)) { | 518 if (cmdline.HasSwitch(switches::kImport)) { |
| 519 return_code = ImportFromBrowser(profile, cmdline); | 519 return_code = ImportFromBrowser(profile, cmdline); |
| 520 } | 520 } |
| 521 #endif | 521 #endif |
| 522 return return_code; | 522 return return_code; |
| 523 } | 523 } |
| 524 | 524 |
| 525 } // namespace first_run | 525 } // namespace first_run |
| OLD | NEW |