[Android] Added UMA for search by image context menu.
[chromium-blink-merge.git] / chrome / installer / util / google_chrome_binaries_distribution.cc
blob16c177d02d406ae6a3f891d5e2aa2de2df77a4b5
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
3 // found in the LICENSE file.
4 //
5 // This file defines a class that contains various method related to branding.
7 #include "chrome/installer/util/google_chrome_binaries_distribution.h"
9 #include "chrome/installer/util/google_update_constants.h"
10 #include "chrome/installer/util/google_update_settings.h"
11 #include "chrome/installer/util/install_util.h"
13 namespace {
15 const wchar_t kChromeBinariesGuid[] = L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}";
16 const wchar_t kChromeBinariesName[] = L"Google Chrome binaries";
18 } // namespace
20 GoogleChromeBinariesDistribution::GoogleChromeBinariesDistribution()
21 : ChromiumBinariesDistribution() {
24 string16 GoogleChromeBinariesDistribution::GetAppGuid() {
25 return kChromeBinariesGuid;
28 string16 GoogleChromeBinariesDistribution::GetAppShortCutName() {
29 return kChromeBinariesName;
32 string16 GoogleChromeBinariesDistribution::GetStateKey() {
33 return string16(google_update::kRegPathClientState)
34 .append(1, L'\\')
35 .append(kChromeBinariesGuid);
38 string16 GoogleChromeBinariesDistribution::GetStateMediumKey() {
39 return string16(google_update::kRegPathClientStateMedium)
40 .append(1, L'\\')
41 .append(kChromeBinariesGuid);
44 string16 GoogleChromeBinariesDistribution::GetVersionKey() {
45 return string16(google_update::kRegPathClients)
46 .append(1, L'\\')
47 .append(kChromeBinariesGuid);
50 void GoogleChromeBinariesDistribution::UpdateInstallStatus(bool system_install,
51 installer::ArchiveType archive_type,
52 installer::InstallStatus install_status) {
53 GoogleUpdateSettings::UpdateInstallStatus(system_install,
54 archive_type, InstallUtil::GetInstallReturnCode(install_status),
55 kChromeBinariesGuid);