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

Side by Side Diff: chrome/installer/gcapi/gcapi_reactivation.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/gcapi/gcapi_reactivation.h" 5 #include "chrome/installer/gcapi/gcapi_reactivation.h"
6 6
7 #include <stdint.h>
8
7 #include "base/time/time.h" 9 #include "base/time/time.h"
8 #include "base/win/registry.h" 10 #include "base/win/registry.h"
9 #include "chrome/installer/gcapi/gcapi.h" 11 #include "chrome/installer/gcapi/gcapi.h"
10 #include "chrome/installer/util/google_update_constants.h" 12 #include "chrome/installer/util/google_update_constants.h"
11 13
12 using base::Time; 14 using base::Time;
13 using base::win::RegKey; 15 using base::win::RegKey;
14 16
15 namespace { 17 namespace {
16 const wchar_t kReactivationHistoryKey[] = L"reactivation"; 18 const wchar_t kReactivationHistoryKey[] = L"reactivation";
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 brand_code.c_str()) == ERROR_SUCCESS; 55 brand_code.c_str()) == ERROR_SUCCESS;
54 } 56 }
55 57
56 if (success) { 58 if (success) {
57 // Store this brand code in the reactivation history. Store it with a 59 // Store this brand code in the reactivation history. Store it with a
58 // a currently un-used timestamp for future proofing. 60 // a currently un-used timestamp for future proofing.
59 RegKey reactivation_key(HKEY_CURRENT_USER, 61 RegKey reactivation_key(HKEY_CURRENT_USER,
60 GetReactivationHistoryKeyPath().c_str(), 62 GetReactivationHistoryKeyPath().c_str(),
61 KEY_WRITE | KEY_WOW64_32KEY); 63 KEY_WRITE | KEY_WOW64_32KEY);
62 if (reactivation_key.Valid()) { 64 if (reactivation_key.Valid()) {
63 int64 timestamp = Time::Now().ToInternalValue(); 65 int64_t timestamp = Time::Now().ToInternalValue();
64 reactivation_key.WriteValue(brand_code.c_str(), 66 reactivation_key.WriteValue(brand_code.c_str(),
65 &timestamp, 67 &timestamp,
66 sizeof(timestamp), 68 sizeof(timestamp),
67 REG_QWORD); 69 REG_QWORD);
68 } 70 }
69 } 71 }
70 72
71 return success; 73 return success;
72 } 74 }
73 75
OLDNEW
« no previous file with comments | « chrome/installer/gcapi/gcapi_omaha_experiment_test.cc ('k') | chrome/installer/gcapi/gcapi_reactivation_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698