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

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: comment nits 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 install_list->AddMoveTreeWorkItem(
806 src_path.Append(kChromeExeConfig).value(),
807 target_path.Append(kChromeExeConfig).value(),
808 temp_path.value(),
809 WorkItem::ALWAYS_MOVE);
810 install_list->AddMoveTreeWorkItem(
811 src_path.Append(kChromeExeManifest).value(),
812 target_path.Append(kChromeExeManifest).value(),
813 temp_path.value(),
814 WorkItem::ALWAYS_MOVE);
815 #endif // defined(COMPONENT_BUILD)
816
797 // In the past, we copied rather than moved for system level installs so that 817 // 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| 818 // the permissions of %ProgramFiles% would be picked up. Now that |temp_path|
799 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA% 819 // is in %ProgramFiles% for system level installs (and in %LOCALAPPDATA%
800 // otherwise), there is no need to do this. 820 // otherwise), there is no need to do this.
801 // Note that we pass true for check_duplicates to avoid failing on in-use 821 // 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. 822 // repair runs if the current_version is the same as the new_version.
803 bool check_for_duplicates = 823 bool check_for_duplicates =
804 (current_version != NULL && current_version->get() != NULL && 824 (current_version != NULL && current_version->get() != NULL &&
805 current_version->get()->Equals(new_version)); 825 current_version->get()->Equals(new_version));
806 install_list->AddMoveTreeWorkItem( 826 install_list->AddMoveTreeWorkItem(
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 } else { 1425 } else {
1406 DCHECK(operation == REMOVE_COMMAND); 1426 DCHECK(operation == REMOVE_COMMAND);
1407 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(), 1427 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(),
1408 cmd_key)->set_log_message( 1428 cmd_key)->set_log_message(
1409 "removing quick-enable-cf command"); 1429 "removing quick-enable-cf command");
1410 } 1430 }
1411 } 1431 }
1412 } 1432 }
1413 1433
1414 } // namespace installer 1434 } // namespace installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698