Commit d33c162b authored by Yusuf Sengul's avatar Yusuf Sengul Committed by Commit Bot

Add the GCPW binary metadata log back

Bug: 1127549
Change-Id: Ie996c71a86bd6303f8e82c20086ad34711b89e80
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2407074Reviewed-by: default avatarRakesh Soma <rakeshsoma@google.com>
Commit-Queue: Yusuf Sengul <yusufsn@google.com>
Cr-Commit-Position: refs/heads/master@{#806779}
parent dbe15ebf
...@@ -67,6 +67,9 @@ STDAPI DllCanUnloadNow(void) { ...@@ -67,6 +67,9 @@ STDAPI DllCanUnloadNow(void) {
// Returns a class factory to create an object of the requested type. // Returns a class factory to create an object of the requested type.
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) {
// This is performed in here to avoid from doing substantial work in DLLMain.
_AtlModule.LogProcessDetails();
// Check to see if the credential provider has crashed too much recently. // Check to see if the credential provider has crashed too much recently.
// If it has then do not allow it to create any credential providers. // If it has then do not allow it to create any credential providers.
if (!credential_provider::WriteToStartupSentinel()) { if (!credential_provider::WriteToStartupSentinel()) {
......
...@@ -104,6 +104,17 @@ void CGaiaCredentialProviderModule::InitializeCrashReporting() { ...@@ -104,6 +104,17 @@ void CGaiaCredentialProviderModule::InitializeCrashReporting() {
} }
} }
void CGaiaCredentialProviderModule::LogProcessDetails() {
wchar_t process_name[MAX_PATH] = {0};
GetModuleFileName(nullptr, process_name, MAX_PATH);
LOGFN(INFO) << "GCPW Initialized in " << process_name
<< " GCPW Version: " << (CHROME_VERSION_STRING)
<< " Windows Build: "
<< base::win::OSInfo::GetInstance()->Kernel32BaseVersion()
<< " Version:" << GetWindowsVersion();
}
BOOL CGaiaCredentialProviderModule::DllMain(HINSTANCE /*hinstance*/, BOOL CGaiaCredentialProviderModule::DllMain(HINSTANCE /*hinstance*/,
DWORD reason, DWORD reason,
LPVOID reserved) { LPVOID reserved) {
......
...@@ -47,6 +47,9 @@ class CGaiaCredentialProviderModule ...@@ -47,6 +47,9 @@ class CGaiaCredentialProviderModule
// once even if the function is called multiple times. // once even if the function is called multiple times.
void InitializeCrashReporting(); void InitializeCrashReporting();
// Logs the details of the module such as version, loading process.
void LogProcessDetails();
private: private:
std::unique_ptr<base::AtExitManager> exit_manager_; std::unique_ptr<base::AtExitManager> exit_manager_;
bool is_testing_ = false; bool is_testing_ = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment