Chromium Code Reviews| Index: chrome/installer/gcapi/gcapi.h |
| diff --git a/chrome/installer/gcapi/gcapi.h b/chrome/installer/gcapi/gcapi.h |
| index a9fd040535b23dda414f87c639f4b66f3c3fffe0..b9d1ca4d643c8ebc18ce6cf2e2f8e70405083a2c 100644 |
| --- a/chrome/installer/gcapi/gcapi.h |
| +++ b/chrome/installer/gcapi/gcapi.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 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. |
| @@ -17,6 +17,17 @@ extern "C" { |
| #define GCCC_ERROR_ALREADYOFFERED 0x10 |
| #define GCCC_ERROR_INTEGRITYLEVEL 0x20 |
| +// Error conditions for CanReactivateChrome(). |
| +#define REACTIVATE_ERROR_NOTINSTALLED 0x01 |
| +#define REACTIVATE_ERROR_NOTDORMANT 0x02 |
| +#define REACTIVATE_ERROR_ALREADY_REACTIVATED 0x04 |
| +#define REACTIVATE_ERROR_INVALID_INPUT 0x08 |
| +#define REACTIVATE_ERROR_REACTIVATION_FAILED 0x10 |
| + |
| +// The minimum number of days an installation can be dormant before reactivation |
| +// may be offered. |
| +const int kReactivationMinDaysDormant = 50; |
| + |
| // This function returns TRUE if Google Chrome should be offered. |
| // If the return is FALSE, the reasons DWORD explains why. If you don't care |
| // for the reason, you can pass NULL for reasons. |
| @@ -54,11 +65,35 @@ BOOL __stdcall LaunchGoogleChromeWithDimensions(int x, |
| // launched. |
| int __stdcall GoogleChromeDaysSinceLastRun(); |
| -// Funtion pointer type declarations to use with GetProcAddress. |
| +// Returns true if a vendor with the specified |brand_code| may offer |
| +// reactivation at this time. If the vendor has previously used other brand |
| +// codes, they must pass them in an array of size |previous_brand_codes_length| |
| +// as |previous_brand_codes|. Returns false if the vendor may not offer |
| +// reactivation at this time, and places one of the REACTIVATE_ERROR_XXX values |
| +// in |error_code| if |error_code| is non-null. |
| +BOOL __stdcall CanOfferReactivation(const wchar_t* brand_code, |
| + int previous_brand_codes_length, |
| + const wchar_t** previous_brand_codes, |
| + DWORD* error_code); |
| + |
| +// Attempts to reactivate Chrome for the specified |brand_code|. If the vendor |
| +// has previously used other brand codes, they must pass them in an array of |
| +// size |previous_brand_codes_length| as |previous_brand_codes|. Returns false |
| +// if reactivation fails, and places one of the REACTIVATE_ERROR_XXX values |
| +// in |error_code| if |error_code| is non-null. |
| +BOOL __stdcall ReactivateChrome(wchar_t* brand_code, |
| + int previous_brand_codes_length, |
| + const wchar_t** previous_brand_codes, |
| + DWORD* error_code); |
| + |
| +// Function 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 int (__stdcall *GCCC_GoogleChromeDaysSinceLastRun)(); |
| +typedef BOOL (__stdcall *GCCC_CanOfferReactivation)(const wchar_t*, DWORD*); |
| +typedef BOOL (__stdcall *GCCC_ReactivateChrome)(const wchar_t*, DWORD*); |
|
Roger Tawa OOO till Jul 10th
2012/01/29 16:32:42
the args for these two typedefs does not seem to m
robertshield
2012/01/30 02:40:39
Done.
|
| + |
| } // extern "C" |
| #endif // CHROME_INSTALLER_GCAPI_GCAPI_H_ |