Upgrade old app host to new app launcher on startup

This patch is a continuation of https://codereview.chromium.org/16805002/.

BUG=248825

Review URL: https://chromiumcodereview.appspot.com/17022015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209604 0039d316-1c4b-4281-b951-d872f2087c98
bool IsProductInstalled(InstallationLevel level, const wchar_t* app_guid) {
  HKEY root_key = (level == USER_LEVEL_INSTALLATION) ?
      HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
  string16 subkey(kGoogleRegClientsKey);
  subkey.append(1, L'\\').append(app_guid);
  base::win::RegKey reg_key;
  return reg_key.Open(root_key, subkey.c_str(),
                      KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS &&
      reg_key.HasValue(kRegVersionField);
}

bool IsProductInstalled(InstallationLevel level, const wchar_t* app_guid) {
  HKEY root_key = (level == USER_LEVEL_INSTALLATION) ?
      HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
  string16 subkey(kGoogleRegClientsKey);
  subkey.append(1, L'\\').append(app_guid);
  base::win::RegKey reg_key;
  return reg_key.Open(root_key, subkey.c_str(),
                      KEY_QUERY_VALUE | KEY_WOW64_32KEY) == ERROR_SUCCESS &&
      reg_key.HasValue(kRegVersionField);
}
