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

Unified Diff: chrome_frame/utils.cc

Issue 465074: Added support for running reliability tests for ChromeFrame on similar lines ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 34059)
+++ chrome_frame/utils.cc (working copy)
@@ -47,6 +47,10 @@
const wchar_t kChromeAttachExternalTabPrefix[] = L"attach_external_tab";
+// Indicates that we are running in a test environment, where execptions, etc
+// are handled by the chrome test crash server.
+const wchar_t kChromeFrameHeadlessMode[] = L"ChromeFrameHeadlessMode";
+
HRESULT UtilRegisterTypeLib(HINSTANCE tlb_instance,
LPCOLESTR index,
bool for_current_user_only) {
@@ -546,6 +550,31 @@
return (value != FALSE);
}
+bool SetConfigInt(const wchar_t* value_name, int value) {
+ RegKey config_key;
+ if (config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey,
+ KEY_SET_VALUE)) {
+ if (config_key.WriteValue(value_name, value)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool SetConfigBool(const wchar_t* value_name, bool value) {
+ return SetConfigInt(value_name, value);
+}
+
+bool DeleteConfigValue(const wchar_t* value_name) {
+ RegKey config_key;
+ if (config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey,
+ KEY_WRITE)) {
+ return config_key.DeleteValue(value_name);
+ }
+ return false;
+}
+
bool IsOptInUrl(const wchar_t* url) {
RegKey config_key;
if (!config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey, KEY_READ))
@@ -667,3 +696,9 @@
return is_non_top_level_request;
}
+
+bool IsHeadlessMode() {
+ bool headless = GetConfigBool(false, kChromeFrameHeadlessMode);
+ return headless;
+}
+
« 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