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

Side by Side Diff: chrome/installer/gcapi/gcapi.h

Issue 9704022: This patch modifies some aspects of GCAPI in support of the new Chrome reactivation functions. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/installer/gcapi/gcapi.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_INSTALLER_GCAPI_GCAPI_H_ 5 #ifndef CHROME_INSTALLER_GCAPI_GCAPI_H_
6 #define CHROME_INSTALLER_GCAPI_GCAPI_H_ 6 #define CHROME_INSTALLER_GCAPI_GCAPI_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // This function returns the number of days since Google Chrome was last run by 68 // This function returns the number of days since Google Chrome was last run by
69 // the current user. If both user-level and machine-wide installations are 69 // the current user. If both user-level and machine-wide installations are
70 // present on the system, it will return the lowest last-run-days count of 70 // present on the system, it will return the lowest last-run-days count of
71 // the two. 71 // the two.
72 // Returns -1 if Chrome is not installed, the last run date is in the future, 72 // Returns -1 if Chrome is not installed, the last run date is in the future,
73 // or we are otherwise unable to determine how long since Chrome was last 73 // or we are otherwise unable to determine how long since Chrome was last
74 // launched. 74 // launched.
75 int __stdcall GoogleChromeDaysSinceLastRun(); 75 int __stdcall GoogleChromeDaysSinceLastRun();
76 76
77 // Returns true if a vendor with the specified |brand_code| may offer 77 // Returns true if a vendor with the specified |brand_code| may offer
78 // reactivation at this time. If the vendor has previously used other brand 78 // reactivation at this time. Returns false if the vendor may not offer
79 // codes, they must pass them in an array of size |previous_brand_codes_length|
80 // as |previous_brand_codes|. Returns false if the vendor may not offer
81 // reactivation at this time, and places one of the REACTIVATE_ERROR_XXX values 79 // reactivation at this time, and places one of the REACTIVATE_ERROR_XXX values
82 // in |error_code| if |error_code| is non-null. 80 // in |error_code| if |error_code| is non-null.
83 // |shell_mode| should be set to one of GCAPI_INVOKED_STANDARD_SHELL or 81 // |shell_mode| should be set to one of GCAPI_INVOKED_STANDARD_SHELL or
84 // GCAPI_INVOKED_UAC_ELEVATION depending on whether this method is invoked 82 // GCAPI_INVOKED_UAC_ELEVATION depending on whether this method is invoked
85 // from an elevated or non-elevated process. 83 // from an elevated or non-elevated process.
86 BOOL __stdcall CanOfferReactivation(const wchar_t* brand_code, 84 BOOL __stdcall CanOfferReactivation(const wchar_t* brand_code,
87 int previous_brand_codes_length,
88 const wchar_t** previous_brand_codes,
89 int shell_mode, 85 int shell_mode,
90 DWORD* error_code); 86 DWORD* error_code);
91 87
92 // Attempts to reactivate Chrome for the specified |brand_code|. If the vendor 88 // Attempts to reactivate Chrome for the specified |brand_code|. Returns false
93 // has previously used other brand codes, they must pass them in an array of
94 // size |previous_brand_codes_length| as |previous_brand_codes|. Returns false
95 // if reactivation fails, and places one of the REACTIVATE_ERROR_XXX values 89 // if reactivation fails, and places one of the REACTIVATE_ERROR_XXX values
96 // in |error_code| if |error_code| is non-null. 90 // in |error_code| if |error_code| is non-null.
97 // |shell_mode| should be set to one of GCAPI_INVOKED_STANDARD_SHELL or 91 // |shell_mode| should be set to one of GCAPI_INVOKED_STANDARD_SHELL or
98 // GCAPI_INVOKED_UAC_ELEVATION depending on whether this method is invoked 92 // GCAPI_INVOKED_UAC_ELEVATION depending on whether this method is invoked
99 // from an elevated or non-elevated process. 93 // from an elevated or non-elevated process.
100 BOOL __stdcall ReactivateChrome(wchar_t* brand_code, 94 BOOL __stdcall ReactivateChrome(wchar_t* brand_code,
101 int previous_brand_codes_length,
102 const wchar_t** previous_brand_codes,
103 int shell_mode, 95 int shell_mode,
104 DWORD* error_code); 96 DWORD* error_code);
105 97
106 // Function pointer type declarations to use with GetProcAddress. 98 // Function pointer type declarations to use with GetProcAddress.
107 typedef BOOL (__stdcall *GCCC_CompatibilityCheck)(BOOL, int, DWORD *); 99 typedef BOOL (__stdcall *GCCC_CompatibilityCheck)(BOOL, int, DWORD *);
108 typedef BOOL (__stdcall *GCCC_LaunchGC)(HANDLE *); 100 typedef BOOL (__stdcall *GCCC_LaunchGC)();
109 typedef BOOL (__stdcall *GCCC_LaunchGCWithDimensions)(int, int, int, int); 101 typedef BOOL (__stdcall *GCCC_LaunchGCWithDimensions)(int, int, int, int, bool);
110 typedef int (__stdcall *GCCC_GoogleChromeDaysSinceLastRun)(); 102 typedef int (__stdcall *GCCC_GoogleChromeDaysSinceLastRun)();
111 typedef BOOL (__stdcall *GCCC_CanOfferReactivation)(const wchar_t*, 103 typedef BOOL (__stdcall *GCCC_CanOfferReactivation)(const wchar_t*,
112 int, 104 int,
113 const wchar_t**,
114 int,
115 DWORD*); 105 DWORD*);
116 typedef BOOL (__stdcall *GCCC_ReactivateChrome)(const wchar_t*, 106 typedef BOOL (__stdcall *GCCC_ReactivateChrome)(const wchar_t*,
117 int, 107 int,
118 const wchar_t**,
119 int,
120 DWORD*); 108 DWORD*);
121 109
122 } // extern "C" 110 } // extern "C"
123 111
124 #endif // CHROME_INSTALLER_GCAPI_GCAPI_H_ 112 #endif // CHROME_INSTALLER_GCAPI_GCAPI_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/installer/gcapi/gcapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698