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

Unified Diff: chrome_frame/utils.cc

Issue 18770009: Added a new policy setting as well as corrisponding registry key to allow GCF users the option to d… (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Uploading from *@workday.com Created 7 years, 4 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_frame/utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/utils.cc
===================================================================
--- chrome_frame/utils.cc (revision 217795)
+++ chrome_frame/utils.cc (working copy)
@@ -9,6 +9,7 @@
#include <htiframe.h>
#include <mshtml.h>
#include <shlobj.h>
+#include <limits>
#include "base/file_version_info.h"
#include "base/lazy_instance.h"
@@ -65,6 +66,7 @@
const wchar_t kChromeFrameConfigKey[] = L"Software\\Google\\ChromeFrame";
const wchar_t kEnableBuggyBhoIntercept[] = L"EnableBuggyBhoIntercept";
const wchar_t kEnableGCFRendererByDefault[] = L"IsDefaultRenderer";
+const wchar_t kSkipGCFMetadataCheck[] = L"SkipGCFMetadataCheck";
const wchar_t kExcludeUAFromDomainList[] = L"ExcludeUAFromDomain";
const wchar_t kPatchProtocols[] = L"PatchProtocols";
const wchar_t kRenderInGCFUrlList[] = L"RenderInGcfUrls";
@@ -737,6 +739,24 @@
return is_default != 0;
}
+// Check for the registry key 'SkipGCFMetadataCheck' and if true, then
+// ignore presence of <meta http-equiv="X-UA-Compatible" content="chrome=1">
+bool SkipMetadataCheck() {
+ // Check policy settings
+ PolicySettings::SkipMetadataCheck metadataCheck =
+ PolicySettings::GetInstance()->skip_metadata_check();
+ if (metadataCheck != PolicySettings::SKIP_METADATA_CHECK_NOT_SPECIFIED)
+ return (metadataCheck == PolicySettings::SKIP_METADATA_CHECK_YES);
+
+ DWORD skip = 0;
+ RegKey config_key;
+ if (config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey,
+ KEY_READ) == ERROR_SUCCESS) {
+ config_key.ReadValueDW(kSkipGCFMetadataCheck, &skip);
+ }
+ return skip != 0;
+}
+
RendererType RendererTypeForUrl(const std::wstring& url) {
// First check if the default renderer settings are specified by policy.
// If so, then that overrides the user settings.
« no previous file with comments | « chrome_frame/utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698