Commit 8e5f6fba authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Add "Google LLC" to the company whitelist.

In preparation for migrating the company name in Chrome's version
resource.

BUG=928220
R=csharp@chromium.org

Change-Id: I6ca745a092a0377dc61b04bd3acec61f647dac96
Reviewed-on: https://chromium-review.googlesource.com/c/1458097
Auto-Submit: Greg Thompson <grt@chromium.org>
Commit-Queue: Chris Sharp <csharp@chromium.org>
Reviewed-by: default avatarChris Sharp <csharp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#630476}
parent af82c617
...@@ -62,9 +62,12 @@ const wchar_t kWindowsCurrentVersionRegKeyName[] = ...@@ -62,9 +62,12 @@ const wchar_t kWindowsCurrentVersionRegKeyName[] =
// "C:\Program Files\Common Files\". // "C:\Program Files\Common Files\".
const wchar_t kCommonProgramW6432[] = L"%CommonProgramW6432%"; const wchar_t kCommonProgramW6432[] = L"%CommonProgramW6432%";
const wchar_t* company_white_list[] = { constexpr const base::char16* kCompanyWhiteList[] = {
L"Google Inc", L"Google Inc.", L"Intel Corporation", STRING16_LITERAL("Google LLC"),
L"Microsoft Corporation", STRING16_LITERAL("Google Inc"),
STRING16_LITERAL("Google Inc."),
STRING16_LITERAL("Intel Corporation"),
STRING16_LITERAL("Microsoft Corporation"),
}; };
// Built from various sources to try and include all the extensions that are // Built from various sources to try and include all the extensions that are
...@@ -502,18 +505,9 @@ base::string16 FileInformationToString( ...@@ -502,18 +505,9 @@ base::string16 FileInformationToString(
bool IsExecutableOnDefaultReportingWhiteList(const base::FilePath& file_path) { bool IsExecutableOnDefaultReportingWhiteList(const base::FilePath& file_path) {
std::unique_ptr<FileVersionInfo> file_information( std::unique_ptr<FileVersionInfo> file_information(
FileVersionInfo::CreateFileVersionInfo(file_path)); FileVersionInfo::CreateFileVersionInfo(file_path));
if (!file_information) return file_information &&
return false; base::ContainsValue(kCompanyWhiteList,
file_information->company_name());
bool white_listed = false;
base::string16 company_name = file_information->company_name();
for (const base::string16& white_listed_name : company_white_list) {
if (company_name.compare(white_listed_name) == 0) {
white_listed = true;
break;
}
}
return white_listed;
} }
bool RetrieveDetailedFileInformation( bool RetrieveDetailedFileInformation(
......
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