Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: chrome/installer/setup/install_worker.cc

Issue 179903004: Always embed manifests, even in component builds! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-add explicit 'EmbedManifest': 'false'; needed? Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // This file contains the definitions of the installer functions that build 5 // This file contains the definitions of the installer functions that build
6 // the WorkItemList used to install the application. 6 // the WorkItemList used to install the application.
7 7
8 #include "chrome/installer/setup/install_worker.h" 8 #include "chrome/installer/setup/install_worker.h"
9 9
10 #include <oaidl.h> 10 #include <oaidl.h>
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 temp_path.value(), 493 temp_path.value(),
494 WorkItem::ALWAYS_MOVE); 494 WorkItem::ALWAYS_MOVE);
495 } else { 495 } else {
496 // We do not want to have an old VisualElementsManifest pointing to an old 496 // We do not want to have an old VisualElementsManifest pointing to an old
497 // version directory. Delete it as there wasn't a new one to replace it. 497 // version directory. Delete it as there wasn't a new one to replace it.
498 install_list->AddDeleteTreeWorkItem( 498 install_list->AddDeleteTreeWorkItem(
499 target_path.Append(installer::kVisualElementsManifest), 499 target_path.Append(installer::kVisualElementsManifest),
500 temp_path); 500 temp_path);
501 } 501 }
502 502
503 // For the component build to work with the installer, we need to also drop
504 // chrome.exe.manifest (other manifests are already contained in the version
505 // directory in the archive so no explicit work is required for them).
506 #if defined(COMPONENT_BUILD)
507 static const base::FilePath::CharType kChromeExeManifest[] =
508 FILE_PATH_LITERAL("chrome.exe.manifest");
509 install_list->AddMoveTreeWorkItem(
510 src_path.Append(kChromeExeManifest).value(),
511 target_path.Append(kChromeExeManifest).value(),
512 temp_path.value(),
513 WorkItem::ALWAYS_MOVE);
514 #endif // defined(COMPONENT_BUILD)
515
516 // In the past, we copied rather than moved for system level installs so that 503 // In the past, we copied rather than moved for system level installs so that
517 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path| 504 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path|
518 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% 505 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA%
519 // otherwise), there is no need to do this. 506 // otherwise), there is no need to do this.
520 // Note that we pass true for check_duplicates to avoid failing on in-use 507 // Note that we pass true for check_duplicates to avoid failing on in-use
521 // repair runs if the current_version is the same as the new_version. 508 // repair runs if the current_version is the same as the new_version.
522 bool check_for_duplicates = (current_version && 509 bool check_for_duplicates = (current_version &&
523 current_version->Equals(new_version)); 510 current_version->Equals(new_version));
524 install_list->AddMoveTreeWorkItem( 511 install_list->AddMoveTreeWorkItem(
525 src_path.AppendASCII(new_version.GetString()).value(), 512 src_path.AppendASCII(new_version.GetString()).value(),
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 // Unconditionally remove the legacy Quick Enable command from the binaries. 1444 // Unconditionally remove the legacy Quick Enable command from the binaries.
1458 // Do this even if multi-install Chrome isn't installed to ensure that it is 1445 // Do this even if multi-install Chrome isn't installed to ensure that it is
1459 // not left behind in any case. 1446 // not left behind in any case.
1460 work_item_list->AddDeleteRegKeyWorkItem( 1447 work_item_list->AddDeleteRegKeyWorkItem(
1461 installer_state.root_key(), cmd_key)->set_log_message( 1448 installer_state.root_key(), cmd_key)->set_log_message(
1462 "removing " + WideToASCII(kCmdQuickEnableCf) + " command"); 1449 "removing " + WideToASCII(kCmdQuickEnableCf) + " command");
1463 1450
1464 } 1451 }
1465 1452
1466 } // namespace installer 1453 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698