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

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

Issue 7353030: Cause new_chrome.exe to always be written if Chrome Frame is in use, resulting in updates being d... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « chrome/browser/first_run/upgrade_util_win.cc ('k') | chrome/installer/util/installer_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <shlobj.h> 10 #include <shlobj.h>
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 FilePath old_archive(old_installer_dir.Append(archive_path.BaseName())); 546 FilePath old_archive(old_installer_dir.Append(archive_path.BaseName()));
547 install_list->AddDeleteTreeWorkItem(old_archive, temp_path) 547 install_list->AddDeleteTreeWorkItem(old_archive, temp_path)
548 ->set_ignore_failure(true); 548 ->set_ignore_failure(true);
549 } 549 }
550 550
551 // Delete any new_chrome.exe if present (we will end up creating a new one 551 // Delete any new_chrome.exe if present (we will end up creating a new one
552 // if required) and then copy chrome.exe 552 // if required) and then copy chrome.exe
553 FilePath new_chrome_exe(target_path.Append(installer::kChromeNewExe)); 553 FilePath new_chrome_exe(target_path.Append(installer::kChromeNewExe));
554 554
555 install_list->AddDeleteTreeWorkItem(new_chrome_exe, temp_path); 555 install_list->AddDeleteTreeWorkItem(new_chrome_exe, temp_path);
556 install_list->AddCopyTreeWorkItem( 556
557 src_path.Append(installer::kChromeExe).value(), 557 if (installer_state.is_chrome_frame_running()) {
558 target_path.Append(installer::kChromeExe).value(), 558 VLOG(1) << "Chrome Frame in use. Copying to new_chrome.exe";
559 temp_path.value(), WorkItem::NEW_NAME_IF_IN_USE, new_chrome_exe.value()); 559 install_list->AddCopyTreeWorkItem(
560 src_path.Append(installer::kChromeExe).value(),
561 new_chrome_exe.value(),
562 temp_path.value(),
563 WorkItem::ALWAYS);
564 } else {
565 install_list->AddCopyTreeWorkItem(
566 src_path.Append(installer::kChromeExe).value(),
567 target_path.Append(installer::kChromeExe).value(),
568 temp_path.value(),
569 WorkItem::NEW_NAME_IF_IN_USE,
570 new_chrome_exe.value());
571 }
560 572
561 // Extra executable for 64 bit systems. 573 // Extra executable for 64 bit systems.
562 // NOTE: We check for "not disabled" so that if the API call fails, we play it 574 // NOTE: We check for "not disabled" so that if the API call fails, we play it
563 // safe and copy the executable anyway. 575 // safe and copy the executable anyway.
564 if (base::win::OSInfo::GetInstance()->wow64_status() != 576 if (base::win::OSInfo::GetInstance()->wow64_status() !=
565 base::win::OSInfo::WOW64_DISABLED) { 577 base::win::OSInfo::WOW64_DISABLED) {
566 install_list->AddMoveTreeWorkItem( 578 install_list->AddMoveTreeWorkItem(
567 src_path.Append(installer::kWowHelperExe).value(), 579 src_path.Append(installer::kWowHelperExe).value(),
568 target_path.Append(installer::kWowHelperExe).value(), 580 target_path.Append(installer::kWowHelperExe).value(),
569 temp_path.value(), 581 temp_path.value(),
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 } else { 1060 } else {
1049 DCHECK(operation == REMOVE_COMMAND); 1061 DCHECK(operation == REMOVE_COMMAND);
1050 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(), 1062 work_item_list->AddDeleteRegKeyWorkItem(installer_state.root_key(),
1051 cmd_key)->set_log_message( 1063 cmd_key)->set_log_message(
1052 "removing quick-enable-cf command"); 1064 "removing quick-enable-cf command");
1053 } 1065 }
1054 } 1066 }
1055 } 1067 }
1056 1068
1057 } // namespace installer 1069 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/browser/first_run/upgrade_util_win.cc ('k') | chrome/installer/util/installer_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698