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

Unified Diff: chrome/installer/util/chrome_frame_distribution.cc

Issue 6288009: More installer refactoring in the interest of fixing some bugs and cleaning t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/chrome_frame_distribution.h ('k') | chrome/installer/util/chrome_frame_operations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/chrome_frame_distribution.cc
===================================================================
--- chrome/installer/util/chrome_frame_distribution.cc (revision 72487)
+++ chrome/installer/util/chrome_frame_distribution.cc (working copy)
@@ -18,8 +18,6 @@
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/l10n_string_util.h"
-#include "chrome/installer/util/master_preferences.h"
-#include "chrome/installer/util/master_preferences_constants.h"
#include "installer_util_strings.h" // NOLINT
@@ -27,38 +25,8 @@
const wchar_t kChromeFrameGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}";
}
-ChromeFrameDistribution::ChromeFrameDistribution(
- const installer::MasterPreferences& prefs)
- : BrowserDistribution(prefs), ceee_(prefs.install_ceee()),
- ready_mode_(false) {
- type_ = BrowserDistribution::CHROME_FRAME;
- prefs.GetBool(installer::master_preferences::kChromeFrameReadyMode,
- &ready_mode_);
-
- bool system_install = false;
- prefs.GetBool(installer::master_preferences::kSystemLevel, &system_install);
-
- // See if Chrome Frame is already installed. If so, we must make sure that
- // the ceee and ready mode flags match.
- CommandLine uninstall(CommandLine::NO_PROGRAM);
- if (installer::GetUninstallSwitches(system_install, this, &uninstall)) {
- if (!ceee_ && uninstall.HasSwitch(installer::switches::kCeee)) {
- LOG(INFO) << "CEEE is not specified on the command line but CEEE is "
- "already installed. Implicitly enabling CEEE.";
- ceee_ = true;
- }
-
- // If the user has already opted in to CF, we shouldn't set the ready-mode
- // flag. If we don't do this, we might have two entries in the Add/Remove
- // Programs list that can uninstall GCF.
- if (ready_mode_) {
- if (!uninstall.HasSwitch(installer::switches::kChromeFrameReadyMode)) {
- LOG(INFO) << "Ready mode was specified on the command line but GCF "
- "is already fully installed. Ignoring command line.";
- ready_mode_ = false;
- }
- }
- }
+ChromeFrameDistribution::ChromeFrameDistribution()
+ : BrowserDistribution(CHROME_FRAME) {
}
std::wstring ChromeFrameDistribution::GetAppGuid() {
@@ -146,61 +114,3 @@
InstallUtil::GetInstallReturnCode(install_status), kChromeFrameGuid);
#endif
}
-
-std::vector<FilePath> ChromeFrameDistribution::GetKeyFiles() {
- std::vector<FilePath> key_files;
- key_files.push_back(FilePath(installer::kChromeFrameDll));
- if (ceee_) {
- key_files.push_back(FilePath(installer::kCeeeIeDll));
- key_files.push_back(FilePath(installer::kCeeeBrokerExe));
- }
- return key_files;
-}
-
-std::vector<FilePath> ChromeFrameDistribution::GetComDllList() {
- std::vector<FilePath> dll_list;
- dll_list.push_back(FilePath(installer::kChromeFrameDll));
- if (ceee_) {
- dll_list.push_back(FilePath(installer::kCeeeInstallHelperDll));
- dll_list.push_back(FilePath(installer::kCeeeIeDll));
- }
- return dll_list;
-}
-
-void ChromeFrameDistribution::AppendUninstallCommandLineFlags(
- CommandLine* cmd_line) {
- DCHECK(cmd_line);
- cmd_line->AppendSwitch(installer::switches::kChromeFrame);
-
- if (ceee_)
- cmd_line->AppendSwitch(installer::switches::kCeee);
-
- if (ready_mode_)
- cmd_line->AppendSwitch(installer::switches::kChromeFrameReadyMode);
-}
-
-bool ChromeFrameDistribution::ShouldCreateUninstallEntry() {
- // If Chrome Frame is being installed in ready mode, then we will not
- // add an entry to the add/remove dialog.
- return !ready_mode_;
-}
-
-bool ChromeFrameDistribution::SetChannelFlags(
- bool set,
- installer::ChannelInfo* channel_info) {
-#if defined(GOOGLE_CHROME_BUILD)
- DCHECK(channel_info);
- bool modified = channel_info->SetChromeFrame(set);
-
- // Always remove the options if we're called to remove flags.
- if (!set || ceee_)
- modified |= channel_info->SetCeee(set);
-
- if (!set || ready_mode_)
- modified |= channel_info->SetReadyMode(set);
-
- return modified;
-#else
- return false;
-#endif
-}
« no previous file with comments | « chrome/installer/util/chrome_frame_distribution.h ('k') | chrome/installer/util/chrome_frame_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698