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

Unified Diff: cloud_print/virtual_driver/win/port_monitor/port_monitor.cc

Issue 7532031: Changes to write various registry keys as required by Omaha for Windows Cloud Print Virtual Driver. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged with trunk. Created 9 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
Index: cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
index fe3398f450e90f8399662fd9a54bc0e060d6f305..3e02e36a9386e055d12300b8f5af74416c568aa0 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
@@ -357,6 +357,16 @@ BOOL WINAPI Monitor2StartDocPort(HANDLE port_handle,
DWORD,
BYTE*) {
LOG(INFO) << "Monitor2StartDocPort";
+ const wchar_t* kUsageKey = L"dr";
+ // Set appropriate key to 1 to let Omaha record usage.
+ base::win::RegKey key;
+ if (key.Create(HKEY_CURRENT_USER, kKeyLocation,
+ KEY_SET_VALUE) != ERROR_SUCCESS) {
+ LOG(ERROR) << "Unable to open key to log usage";
+ }
+ if (key.WriteValue(kUsageKey, L"1") != ERROR_SUCCESS) {
+ LOG(ERROR) << "Unable to set usage key";
+ }
if (port_handle == NULL) {
LOG(ERROR) << "port_handle should not be NULL.";
SetLastError(ERROR_INVALID_PARAMETER);
« no previous file with comments | « cloud_print/virtual_driver/win/install/setup.cc ('k') | cloud_print/virtual_driver/win/virtual_driver_consts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698