summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_tab.cc
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 13:50:03 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 13:50:03 +0000
commit65927ef362b19674fa52541609e339752349042f (patch)
tree3f32e5fe75fb1562dcbcbab4c51e75bf40a07e9b /chrome_frame/chrome_tab.cc
parent44a69f56d13585d17d3356d2a8b212a75fd14271 (diff)
downloadchromium_src-65927ef362b19674fa52541609e339752349042f.zip
chromium_src-65927ef362b19674fa52541609e339752349042f.tar.gz
chromium_src-65927ef362b19674fa52541609e339752349042f.tar.bz2
Revert 44473 (build breakage on bots) - Add multiversion delegation to Chrome Frame such that CF will scan for older versions on load and delegate to them. This is to support clean upgrade scenarios whereby a new version is registered while IE is running.
BUG=40117 TEST=Register a new CF version while an old one is loaded in IE. Open a few new tabs and observe nothing bad happening. Review URL: http://codereview.chromium.org/1562018 TBR=robertshield@chromium.org Review URL: http://codereview.chromium.org/1604035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44474 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_tab.cc')
-rw-r--r--chrome_frame/chrome_tab.cc33
1 files changed, 5 insertions, 28 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index 08e8a84..d8deec4 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -13,7 +13,6 @@
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/file_version_info.h"
-#include "base/lock.h"
#include "base/logging.h"
#include "base/logging_win.h"
#include "base/path_service.h"
@@ -31,7 +30,6 @@
#include "chrome_frame/chrome_frame_reporting.h"
#include "chrome_frame/chrome_launcher.h"
#include "chrome_frame/chrome_protocol.h"
-#include "chrome_frame/module_utils.h"
#include "chrome_frame/resource.h"
#include "chrome_frame/utils.h"
#include "googleurl/src/url_util.h"
@@ -47,6 +45,7 @@ void InitGoogleUrl() {
url_util::IsStandard(kDummyUrl,
url_parse::MakeRange(0, arraysize(kDummyUrl)));
}
+
}
static const wchar_t kBhoRegistryPath[] =
@@ -73,11 +72,6 @@ OBJECT_ENTRY_AUTO(__uuidof(ChromeActiveDocument), ChromeActiveDocument)
OBJECT_ENTRY_AUTO(__uuidof(ChromeFrame), ChromeFrameActivex)
OBJECT_ENTRY_AUTO(__uuidof(ChromeProtocol), ChromeProtocol)
-
-// See comments in DllGetClassObject.
-DllRedirector g_dll_redirector;
-Lock g_redirector_lock;
-
class ChromeTabModule
: public AtlPerUserModule<CAtlDllModuleT<ChromeTabModule> > {
public:
@@ -322,29 +316,12 @@ STDAPI DllCanUnloadNow() {
// Returns a class factory to create an object of the requested type
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) {
- // On first call, we scan the loaded module list to see if an older version
- // of Chrome Frame is already loaded. If it is, then we delegate all calls
- // to DllGetClassObject to it. This is to avoid having instances of
- // different versions of e.g. the BHO through an upgrade. It also prevents
- // us from repeatedly patching.
- LPFNGETCLASSOBJECT redir_ptr = NULL;
- {
- AutoLock lock(g_redirector_lock);
- g_dll_redirector.EnsureInitialized(L"npchrome_frame.dll",
- CLSID_ChromeActiveDocument);
- redir_ptr = g_dll_redirector.get_dll_get_class_object_ptr();
+ if (g_patch_helper.InitializeAndPatchProtocolsIfNeeded()) {
+ // We should only get here once.
+ UrlMkSetSessionOption(URLMON_OPTION_USERAGENT_REFRESH, NULL, 0, 0);
}
- if (redir_ptr) {
- return redir_ptr(rclsid, riid, ppv);
- } else {
- if (g_patch_helper.InitializeAndPatchProtocolsIfNeeded()) {
- // We should only get here once.
- UrlMkSetSessionOption(URLMON_OPTION_USERAGENT_REFRESH, NULL, 0, 0);
- }
-
- return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
- }
+ return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
}
// DllRegisterServer - Adds entries to the system registry