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

Unified Diff: chrome_frame/utils.cc

Issue 17153006: Chrome Frame turndown prompt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase to r208076 Created 7 years, 6 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
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc
index f55c4bfec19949e3f9fd2fc98d0a6485b7ff8a21..7843961a3b8a84e69241c401a27f013264ce306d 100644
--- a/chrome_frame/utils.cc
+++ b/chrome_frame/utils.cc
@@ -660,6 +660,17 @@ int GetConfigInt(int default_value, const wchar_t* value_name) {
return ret;
}
+int64 GetConfigInt64(int64 default_value, const wchar_t* value_name) {
+ int64 ret = default_value;
+ RegKey config_key;
+ if (config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey,
+ KEY_QUERY_VALUE) == ERROR_SUCCESS) {
+ config_key.ReadInt64(value_name, &ret);
+ }
+
+ return ret;
+}
+
bool GetConfigBool(bool default_value, const wchar_t* value_name) {
DWORD value = GetConfigInt(default_value, value_name);
return (value != FALSE);
@@ -681,6 +692,19 @@ bool SetConfigBool(const wchar_t* value_name, bool value) {
return SetConfigInt(value_name, value);
}
+bool SetConfigInt64(const wchar_t* value_name, int64 value) {
+ RegKey config_key;
+ if (config_key.Create(HKEY_CURRENT_USER, kChromeFrameConfigKey,
+ KEY_SET_VALUE) == ERROR_SUCCESS) {
+ if (config_key.WriteValue(value_name, &value, sizeof(value),
+ REG_QWORD) == ERROR_SUCCESS) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
bool DeleteConfigValue(const wchar_t* value_name) {
RegKey config_key;
if (config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey,
« 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