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

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

Issue 9701050: Make setup.exe compatible with the component build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: <fixed greg='happy as can be'/> Created 8 years, 7 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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 temp_path.value(), 787 temp_path.value(),
788 WorkItem::ALWAYS_MOVE); 788 WorkItem::ALWAYS_MOVE);
789 } else { 789 } else {
790 // We do not want to have an old VisualElementsManifest pointing to an old 790 // We do not want to have an old VisualElementsManifest pointing to an old
791 // version directory. Delete it as there wasn't a new one to replace it. 791 // version directory. Delete it as there wasn't a new one to replace it.
792 install_list->AddDeleteTreeWorkItem( 792 install_list->AddDeleteTreeWorkItem(
793 target_path.Append(installer::kVisualElementsManifest), 793 target_path.Append(installer::kVisualElementsManifest),
794 temp_path); 794 temp_path);
795 } 795 }
796 796
797 // For the component build to work with the installer, we need to drop a
798 // config file and a manifest by chrome.exe. These files are only found in
799 // the archive if this is a component build.
800 #if defined(COMPONENT_BUILD)
801 static const FilePath::CharType kChromeExeConfig[] =
802 FILE_PATH_LITERAL("chrome.exe.config");
803 static const FilePath::CharType kChromeExeManifest[] =
804 FILE_PATH_LITERAL("chrome.exe.manifest");
805 if (file_util::PathExists(src_path.Append(kChromeExeManifest))) {
806 install_list->AddMoveTreeWorkItem(
807 src_path.Append(kChromeExeConfig).value(),
808 target_path.Append(kChromeExeConfig).value(),
809 temp_path.value(),
810 WorkItem::ALWAYS_MOVE);
811 install_list->AddMoveTreeWorkItem(
812 src_path.Append(kChromeExeManifest).value(),
813 target_path.Append(kChromeExeManifest).value(),
814 temp_path.value(),
815 WorkItem::ALWAYS_MOVE);
816 }
817 #endif // defined(COMPONENT_BUILD)
818
797 // In the past, we copied rather than moved for system level installs so that 819 // In the past, we copied rather than moved for system level installs so that
798 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path| 820 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path|
799 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% 821 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA%
800 // otherwise), there is no need to do this. 822 // otherwise), there is no need to do this.
801 // Note that we pass true for check_duplicates to avoid failing on in-use 823 // Note that we pass true for check_duplicates to avoid failing on in-use
802 // repair runs if the current_version is the same as the new_version. 824 // repair runs if the current_version is the same as the new_version.
803 bool check_for_duplicates = 825 bool check_for_duplicates =
804 (current_version != NULL && current_version->get() != NULL && 826 (current_version != NULL && current_version->get() != NULL &&
805 current_version->get()->Equals(new_version)); 827 current_version->get()->Equals(new_version));
806 install_list->AddMoveTreeWorkItem( 828 install_list->AddMoveTreeWorkItem(
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 } else { 1427 } else {
1406 DCHECK(operation == REMOVE_COMMAND); 1428 DCHECK(operation == REMOVE_COMMAND);
1407 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(), 1429 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(),
1408 cmd_key)->set_log_message( 1430 cmd_key)->set_log_message(
1409 "removing quick-enable-cf command"); 1431 "removing quick-enable-cf command");
1410 } 1432 }
1411 } 1433 }
1412 } 1434 }
1413 1435
1414 } // namespace installer 1436 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698