Skip to content

Commit

Permalink
Remove metro EULA launch from the installer.
Browse files Browse the repository at this point in the history
R=robertshield@chromium.org
BUG=558054

Review-Url: https://codereview.chromium.org/2457723002
Cr-Commit-Position: refs/heads/master@{#428303}
  • Loading branch information
GregTho authored and Commit bot committed Oct 28, 2016
1 parent faaf101 commit 07d86e6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
26 changes: 0 additions & 26 deletions chrome/installer/setup/setup_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "base/win/process_startup_helper.h"
#include "base/win/registry.h"
#include "base/win/scoped_com_initializer.h"
#include "base/win/scoped_comptr.h"
#include "base/win/scoped_handle.h"
#include "base/win/win_util.h"
#include "base/win/windows_version.h"
Expand Down Expand Up @@ -1066,28 +1065,6 @@ bool CreateEULASentinel(BrowserDistribution* dist) {
base::WriteFile(eula_sentinel, "", 0) != -1);
}

void ActivateMetroChrome() {
// Check to see if we're per-user or not. Need to do this since we may
// not have been invoked with --system-level even for a machine install.
base::FilePath exe_path;
PathService::Get(base::FILE_EXE, &exe_path);
bool is_per_user_install = InstallUtil::IsPerUserInstall(exe_path);

base::string16 app_model_id = ShellUtil::GetBrowserModelId(
BrowserDistribution::GetDistribution(), is_per_user_install);

base::win::ScopedComPtr<IApplicationActivationManager> activator;
HRESULT hr = activator.CreateInstance(CLSID_ApplicationActivationManager);
if (SUCCEEDED(hr)) {
DWORD pid = 0;
hr = activator->ActivateApplication(
app_model_id.c_str(), L"open", AO_NONE, &pid);
}

LOG_IF(ERROR, FAILED(hr)) << "Tried and failed to launch Metro Chrome. "
<< "hr=" << std::hex << hr;
}

installer::InstallStatus RegisterDevChrome(
const InstallationState& original_state,
const InstallerState& installer_state,
Expand Down Expand Up @@ -1231,9 +1208,6 @@ bool HandleNonInstallCmdLineOptions(const base::FilePath& setup_exe,
*original_state, BrowserDistribution::GetDistribution(), true)) {
CreateEULASentinel(BrowserDistribution::GetDistribution());
}
// For a metro-originated launch, we now need to launch back into metro.
if (cmd_line.HasSwitch(installer::switches::kShowEulaForMetro))
ActivateMetroChrome();
}
} else if (cmd_line.HasSwitch(installer::switches::kConfigureUserSettings)) {
// NOTE: Should the work done here, on kConfigureUserSettings, change:
Expand Down
3 changes: 0 additions & 3 deletions chrome/installer/util/util_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,6 @@ const char kVerboseLogging[] = "verbose-logging";
// Show the embedded EULA dialog.
const char kShowEula[] = "show-eula";

// Show the embedded EULA dialog, relaunch metro Chrome on acceptance.
const char kShowEulaForMetro[] = "show-eula-for-metro";

// Perform the inactive user toast experiment.
const char kInactiveUserToast[] = "inactive-user-toast";

Expand Down
1 change: 0 additions & 1 deletion chrome/installer/util/util_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ extern const char kUpdateSetupExe[];
extern const char kUncompressedArchive[];
extern const char kVerboseLogging[];
extern const char kShowEula[];
extern const char kShowEulaForMetro[];
extern const char kInactiveUserToast[];
extern const char kSystemLevelToast[];
extern const char kExperimentGroup[];
Expand Down

0 comments on commit 07d86e6

Please sign in to comment.