summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_tab.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-17 04:48:37 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-17 04:48:37 +0000
commit3f55e8712f88d8477d9e58f68958e83c92664389 (patch)
tree21f9eeeda041fd570c31d8b0f266f780b767418f /chrome_frame/chrome_tab.cc
parentcd1c89e833b7e67b7a7ca8799122e07b65999771 (diff)
downloadchromium_src-3f55e8712f88d8477d9e58f68958e83c92664389.zip
chromium_src-3f55e8712f88d8477d9e58f68958e83c92664389.tar.gz
chromium_src-3f55e8712f88d8477d9e58f68958e83c92664389.tar.bz2
Add the chromeframe tag to the user agent header at runtime instead of statically in the registry.TEST=Try disabling GCF and see if the chromeframe tag in the user agent is still set. It should not be. Also make sure you don't have an older version installed... the chromeframe tag should not be in the registry - if it is, you've got an older version still registered. This should fix the issue with going to wave.google.com after disabling chrome frame and seeing the white page of death.R=amitBUG=22760
Review URL: http://codereview.chromium.org/259025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29370 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_tab.cc')
-rw-r--r--chrome_frame/chrome_tab.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc
index dab6aac..a9423f3 100644
--- a/chrome_frame/chrome_tab.cc
+++ b/chrome_frame/chrome_tab.cc
@@ -3,6 +3,12 @@
// found in the LICENSE file.
// chrome_tab.cc : Implementation of DLL Exports.
+
+// Include without path to make GYP build see it.
+#include "chrome_tab.h" // NOLINT
+
+#include <atlsecurity.h>
+
#include "base/at_exit.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -23,10 +29,6 @@
#include "chrome_frame/resource.h"
#include "chrome_frame/utils.h"
-// Include without path to make GYP build see it.
-#include "chrome_tab.h" // NOLINT
-#include <atlsecurity.h>
-
static const wchar_t kBhoRegistryPath[] =
L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"
L"\\Browser Helper Objects";
@@ -148,6 +150,7 @@ const wchar_t kPostPlatformUAKey[] =
const wchar_t kClockUserAgent[] = L"chromeframe";
// To delete the clock user agent, set value to NULL.
+// TODO(tommi): Remove this method when it's no longer used.
HRESULT SetClockUserAgent(const wchar_t* value) {
HRESULT hr;
RegKey ua_key;
@@ -214,12 +217,14 @@ HRESULT RegisterChromeTabBHO() {
ie_bho_key.WriteValue(kBhoNoLoadExplorerValue, 1);
DLOG(INFO) << "Registered ChromeTab BHO";
- SetClockUserAgent(L"1");
+ // We now add the chromeframe user agent at runtime.
+ // SetClockUserAgent(L"1");
RefreshElevationPolicy();
return S_OK;
}
HRESULT UnregisterChromeTabBHO() {
+ // TODO(tommi): remove this in future versions.
SetClockUserAgent(NULL);
RegKey ie_bho_key;