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

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

Issue 131763004: Merge 242400 "Remove installation of Chrome Frame." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 6 years, 11 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/installer/setup/setup_util.h ('k') | chrome/installer/setup/setup_util_unittest.cc » ('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) 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 declares util functions for setup project. 5 // This file declares util functions for setup project.
6 6
7 #include "chrome/installer/setup/setup_util.h" 7 #include "chrome/installer/setup/setup_util.h"
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 422
423 bool IsUninstallSuccess(InstallStatus install_status) { 423 bool IsUninstallSuccess(InstallStatus install_status) {
424 // The following status values represent failed uninstalls: 424 // The following status values represent failed uninstalls:
425 // 15: CHROME_NOT_INSTALLED 425 // 15: CHROME_NOT_INSTALLED
426 // 20: UNINSTALL_FAILED 426 // 20: UNINSTALL_FAILED
427 // 21: UNINSTALL_CANCELLED 427 // 21: UNINSTALL_CANCELLED
428 return (install_status == UNINSTALL_SUCCESSFUL || 428 return (install_status == UNINSTALL_SUCCESSFUL ||
429 install_status == UNINSTALL_REQUIRES_REBOOT); 429 install_status == UNINSTALL_REQUIRES_REBOOT);
430 } 430 }
431 431
432 bool ContainsUnsupportedSwitch(const CommandLine& cmd_line) {
433 static const char* const kLegacySwitches[] = {
434 // Chrome Frame ready-mode.
435 "ready-mode",
436 "ready-mode-opt-in",
437 "ready-mode-temp-opt-out",
438 "ready-mode-end-temp-opt-out",
439 // Chrome Frame quick-enable.
440 "quick-enable-cf",
441 // Installation of Chrome Frame.
442 "chrome-frame",
443 "migrate-chrome-frame",
444 };
445 for (size_t i = 0; i < arraysize(kLegacySwitches); ++i) {
446 if (cmd_line.HasSwitch(kLegacySwitches[i]))
447 return true;
448 }
449 return false;
450 }
451
432 ScopedTokenPrivilege::ScopedTokenPrivilege(const wchar_t* privilege_name) 452 ScopedTokenPrivilege::ScopedTokenPrivilege(const wchar_t* privilege_name)
433 : is_enabled_(false) { 453 : is_enabled_(false) {
434 HANDLE temp_handle; 454 HANDLE temp_handle;
435 if (!::OpenProcessToken(::GetCurrentProcess(), 455 if (!::OpenProcessToken(::GetCurrentProcess(),
436 TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, 456 TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,
437 &temp_handle)) { 457 &temp_handle)) {
438 return; 458 return;
439 } 459 }
440 token_.Set(temp_handle); 460 token_.Set(temp_handle);
441 461
(...skipping 21 matching lines...) Expand all
463 } 483 }
464 484
465 ScopedTokenPrivilege::~ScopedTokenPrivilege() { 485 ScopedTokenPrivilege::~ScopedTokenPrivilege() {
466 if (is_enabled_ && previous_privileges_.PrivilegeCount != 0) { 486 if (is_enabled_ && previous_privileges_.PrivilegeCount != 0) {
467 ::AdjustTokenPrivileges(token_, FALSE, &previous_privileges_, 487 ::AdjustTokenPrivileges(token_, FALSE, &previous_privileges_,
468 sizeof(TOKEN_PRIVILEGES), NULL, NULL); 488 sizeof(TOKEN_PRIVILEGES), NULL, NULL);
469 } 489 }
470 } 490 }
471 491
472 } // namespace installer 492 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_util.h ('k') | chrome/installer/setup/setup_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698