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

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: Created 7 years, 5 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
« chrome_frame/policy_settings.cc ('K') | « 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 214408)
+++ 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,25 @@
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() {
+ DWORD skip = 0;
+ // Check policy settings
+ PolicySettings::PerformMetadataCheck metadataCheck =
+ PolicySettings::GetInstance()->metadata_check();
+ if (metadataCheck != PolicySettings::METADATA_CHECK_NOT_SPECIFIED) {
+ skip = (metadataCheck == PolicySettings::METADATA_CHECK_YES);
grt (UTC plus 2) 2013/08/01 19:22:57 |skip| is a dword, not a boolean. i suggest simpli
+ } else {
+ 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.
« chrome_frame/policy_settings.cc ('K') | « chrome_frame/utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698