| Index: chrome/installer/setup/install_worker.cc
|
| diff --git a/chrome/installer/setup/install_worker.cc b/chrome/installer/setup/install_worker.cc
|
| index cd17feea47e150abf09e29bb9bc847b780027d0f..d68582f1f595b803d01cb93fcf961148cce2cdc3 100644
|
| --- a/chrome/installer/setup/install_worker.cc
|
| +++ b/chrome/installer/setup/install_worker.cc
|
| @@ -10,6 +10,7 @@
|
| #include <oaidl.h>
|
| #include <shlobj.h>
|
| #include <time.h>
|
| +
|
| #include <vector>
|
|
|
| #include "base/command_line.h"
|
| @@ -776,34 +777,23 @@ void AddInstallWorkItems(const InstallationState& original_state,
|
| }
|
|
|
| if (base::win::GetVersion() >= base::win::VERSION_WIN8) {
|
| - // Desktop only (i.e. not supporting Metro) versions of Chromium do not have
|
| - // to include visual elements.
|
| - scoped_ptr<WorkItemList> win8_work_items(
|
| - WorkItem::CreateConditionalWorkItemList(new ConditionRunIfFileExists(
|
| - src_path.Append(L"visualelementsmanifest.xml"))));
|
| - // TODO (gab): All of these hard-coded strings are temporary and will be
|
| - // deleted in the patch following this one.
|
| - win8_work_items->AddMoveTreeWorkItem(
|
| - src_path.Append(L"visualelementsmanifest.xml").value(),
|
| - target_path.Append(L"visualelementsmanifest.xml").value(),
|
| - temp_path.value(),
|
| - WorkItem::ALWAYS_MOVE);
|
| - win8_work_items->AddMoveTreeWorkItem(
|
| - src_path.Append(L"logo.png").value(),
|
| - target_path.Append(L"logo.png").value(),
|
| - temp_path.value(),
|
| - WorkItem::ALWAYS_MOVE);
|
| - win8_work_items->AddMoveTreeWorkItem(
|
| - src_path.Append(L"smalllogo.png").value(),
|
| - target_path.Append(L"smalllogo.png").value(),
|
| - temp_path.value(),
|
| - WorkItem::ALWAYS_MOVE);
|
| - win8_work_items->AddMoveTreeWorkItem(
|
| - src_path.Append(L"splash-620x300.png").value(),
|
| - target_path.Append(L"splash-620x300.png").value(),
|
| - temp_path.value(),
|
| - WorkItem::ALWAYS_MOVE);
|
| - install_list->AddWorkItem(win8_work_items.release());
|
| + // Install kVisualElementsManifest if it is present in |src_path|. No need
|
| + // to make this a conditional work item as if the file is not there now, it
|
| + // will never be.
|
| + if (file_util::PathExists(
|
| + src_path.Append(installer::kVisualElementsManifest))) {
|
| + install_list->AddMoveTreeWorkItem(
|
| + src_path.Append(installer::kVisualElementsManifest).value(),
|
| + target_path.Append(installer::kVisualElementsManifest).value(),
|
| + temp_path.value(),
|
| + WorkItem::ALWAYS_MOVE);
|
| + } else {
|
| + // We do not want to have an old VisualElementsManifest pointing to an old
|
| + // version directory. Delete it as there wasn't a new one to replace it.
|
| + install_list->AddDeleteTreeWorkItem(
|
| + target_path.Append(installer::kVisualElementsManifest),
|
| + temp_path);
|
| + }
|
| }
|
|
|
| // In the past, we copied rather than moved for system level installs so that
|
| @@ -822,14 +812,6 @@ void AddInstallWorkItems(const InstallationState& original_state,
|
| check_for_duplicates ? WorkItem::CHECK_DUPLICATES :
|
| WorkItem::ALWAYS_MOVE);
|
|
|
| - // Copy the default Dictionaries only if the folder doesn't exist already.
|
| - // TODO(grt): Use AddMoveTreeWorkItem in a conditional WorkItemList, which
|
| - // will be more efficient in space and time.
|
| - install_list->AddCopyTreeWorkItem(
|
| - src_path.Append(installer::kDictionaries).value(),
|
| - target_path.Append(installer::kDictionaries).value(),
|
| - temp_path.value(), WorkItem::IF_NOT_PRESENT);
|
| -
|
| // Delete any old_chrome.exe if present (ignore failure if it's in use).
|
| install_list->AddDeleteTreeWorkItem(
|
| target_path.Append(installer::kChromeOldExe), temp_path)
|
|
|