diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 16:57:41 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 16:57:41 +0000 |
commit | e5b826e46e8a435945f94370bd50bc7ee1749607 (patch) | |
tree | b971065c84b55f0dc3f44838bc6b6b021e51bffc /chrome/installer/util | |
parent | 48fe9f38c0fa156a18b6f2d283076db20450321f (diff) | |
download | chromium_src-e5b826e46e8a435945f94370bd50bc7ee1749607.zip chromium_src-e5b826e46e8a435945f94370bd50bc7ee1749607.tar.gz chromium_src-e5b826e46e8a435945f94370bd50bc7ee1749607.tar.bz2 |
Removing IsChromeFrameProcess.
This further reduces Chrome's dependencies on the installer and fixes a problem where Chrome might pick up the "chrome_frame" variable from the master preferences file and all chrome processes might have assumed they were cf processes.
TEST=See description.
BUG=61609
Review URL: http://codereview.chromium.org/5973006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util')
-rw-r--r-- | chrome/installer/util/browser_distribution.cc | 7 | ||||
-rw-r--r-- | chrome/installer/util/install_util.cc | 6 | ||||
-rw-r--r-- | chrome/installer/util/install_util.h | 6 | ||||
-rw-r--r-- | chrome/installer/util/master_preferences_dummy.cc | 3 |
4 files changed, 6 insertions, 16 deletions
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc index 2aa80b8..ba54e70 100644 --- a/chrome/installer/util/browser_distribution.cc +++ b/chrome/installer/util/browser_distribution.cc @@ -21,11 +21,13 @@ #include "chrome/installer/util/chrome_frame_distribution.h" #include "chrome/installer/util/google_chrome_distribution.h" #include "chrome/installer/util/google_chrome_sxs_distribution.h" -#include "chrome/installer/util/install_util.h" #include "chrome/installer/util/l10n_string_util.h" +#include "chrome/installer/util/master_preferences.h" #include "installer_util_strings.h" // NOLINT +using installer::MasterPreferences; + namespace { // The BrowserDistribution objects are never freed. BrowserDistribution* g_browser_distribution = NULL; @@ -50,7 +52,8 @@ bool IsCeeeBrokerProcess() { BrowserDistribution::Type GetCurrentDistributionType() { static BrowserDistribution::Type type = - (InstallUtil::IsChromeFrameProcess() || IsChromeFrameModule()) ? + (MasterPreferences::ForCurrentProcess().install_chrome_frame() || + IsChromeFrameModule()) ? BrowserDistribution::CHROME_FRAME : BrowserDistribution::CHROME_BROWSER; return type; diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc index c5384b3..6676bae 100644 --- a/chrome/installer/util/install_util.cc +++ b/chrome/installer/util/install_util.cc @@ -119,12 +119,6 @@ bool InstallUtil::IsPerUserInstall(const wchar_t* const exe_path) { return true; } -bool InstallUtil::IsChromeFrameProcess() { - const MasterPreferences& prefs = - installer::MasterPreferences::ForCurrentProcess(); - return prefs.install_chrome_frame(); -} - bool CheckIsChromeSxSProcess() { CommandLine* command_line = CommandLine::ForCurrentProcess(); CHECK(command_line); diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h index 59a4fb5..b2ba973 100644 --- a/chrome/installer/util/install_util.h +++ b/chrome/installer/util/install_util.h @@ -59,12 +59,6 @@ class InstallUtil { // Program Files). static bool IsPerUserInstall(const wchar_t* const exe_path); - // Returns true if this is a Chrome Frame installation (as indicated by the - // presence of --chrome-frame on the command line) or if this is running - // inside of the Chrome Frame dll. Also returns true if a master.preferences - // file containing chrome_frame: true is specified on the command line. - static bool IsChromeFrameProcess(); - // Returns true if this is running setup process for Chrome SxS (as // indicated by the presence of --chrome-sxs on the command line) or if this // is running Chrome process from the Chrome SxS installation (as indicated diff --git a/chrome/installer/util/master_preferences_dummy.cc b/chrome/installer/util/master_preferences_dummy.cc index 0112bee..4869ac6 100644 --- a/chrome/installer/util/master_preferences_dummy.cc +++ b/chrome/installer/util/master_preferences_dummy.cc @@ -30,8 +30,7 @@ MasterPreferences::~MasterPreferences() { } bool MasterPreferences::GetBool(const std::string& name, bool* value) const { - // This function is called by InstallUtil::IsChromeFrameProcess() - // We return false because GetInstallPreferences returns an empty value below. + NOTREACHED(); return false; } |