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

Unified Diff: chrome/installer/gcapi/gcapi.h

Issue 8508060: Add functionality to the GCAPI to detect when Chrome was last run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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: chrome/installer/gcapi/gcapi.h
===================================================================
--- chrome/installer/gcapi/gcapi.h (revision 108839)
+++ chrome/installer/gcapi/gcapi.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -27,7 +27,7 @@
// set the flag even if Chrome can be offered. If passed TRUE, this method
// will set the flag only if Chrome can be offered.
DLLEXPORT BOOL __stdcall GoogleChromeCompatibilityCheck(BOOL set_flag,
- DWORD *reasons);
+ DWORD* reasons);
// This function launches Google Chrome after a successful install. Make
// sure COM library is NOT initalized before you call this function (so if
@@ -45,10 +45,19 @@
int width,
int height);
+// This function returns the number of days since Google Chrome was last run by
+// the current user. If both user-level and machine-wide installations are
+// present on the system, it will return the lowest last-run-days count of
+// the two.
+// Returns -1 if Chrome is not installed or we are otherwise unable to determine
+// how long since Chrome was last launched.
+DLLEXPORT int __stdcall GoogleChromeDaysSinceLastRun();
+
// Funtion pointer type declarations to use with GetProcAddress.
-typedef BOOL (__stdcall * GCCC_CompatibilityCheck)(BOOL, DWORD *);
-typedef BOOL (__stdcall * GCCC_LaunchGC)(HANDLE *);
-typedef BOOL (__stdcall * GCCC_LaunchGCWithDimensions)(int, int, int, int);
+typedef BOOL (__stdcall *GCCC_CompatibilityCheck)(BOOL, DWORD *);
+typedef BOOL (__stdcall *GCCC_LaunchGC)(HANDLE *);
+typedef BOOL (__stdcall *GCCC_LaunchGCWithDimensions)(int, int, int, int);
+typedef int (__stdcall *GCCC_GoogleChromeDaysSinceLastRun)();
} // extern "C"
#endif // CHROME_INSTALLER_GCAPI_GCAPI_H_

Powered by Google App Engine
This is Rietveld 408576698