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

Side by Side Diff: chrome/installer/util/google_chrome_binaries_distribution.cc

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework Created 7 years, 7 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
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 // This file defines a class that contains various method related to branding. 5 // This file defines a class that contains various method related to branding.
6 6
7 #include "chrome/installer/util/google_chrome_binaries_distribution.h" 7 #include "chrome/installer/util/google_chrome_binaries_distribution.h"
8 8
9 #include "chrome/installer/util/google_update_constants.h" 9 #include "chrome/installer/util/google_update_constants.h"
10 #include "chrome/installer/util/google_update_settings.h" 10 #include "chrome/installer/util/google_update_settings.h"
11 #include "chrome/installer/util/install_util.h" 11 #include "chrome/installer/util/install_util.h"
12 12
13 namespace { 13 namespace {
14 14
15 const wchar_t kChromeBinariesGuid[] = L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}"; 15 const wchar_t kChromeBinariesGuid[] = L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}";
16 const wchar_t kChromeBinariesName[] = L"Google Chrome binaries"; 16 const wchar_t kChromeBinariesName[] = L"Google Chrome binaries";
17 17
18 } // namespace 18 } // namespace
19 19
20 GoogleChromeBinariesDistribution::GoogleChromeBinariesDistribution() 20 GoogleChromeBinariesDistribution::GoogleChromeBinariesDistribution()
21 : ChromiumBinariesDistribution() { 21 : ChromiumBinariesDistribution() {
22 } 22 }
23 23
24 string16 GoogleChromeBinariesDistribution::GetAppGuid() { 24 string16 GoogleChromeBinariesDistribution::GetAppGuid() {
25 return kChromeBinariesGuid; 25 return kChromeBinariesGuid;
26 } 26 }
27 27
28 string16 GoogleChromeBinariesDistribution::GetAppShortCutName() { 28 BrowserDistribution::ShortcutInfo
gab 2013/05/24 15:01:35 Same comment here then on chromium_binaries_distri
calamity 2013/05/31 00:11:18 Done.
29 return kChromeBinariesName; 29 GoogleChromeBinariesDistribution::GetShortcutInfo(
30 ShortcutEnum shortcut_enum) {
31 ShortcutInfo info;
32 switch (shortcut_enum) {
33 case SHORTCUT_CHROME:
34 info.name = kChromeBinariesName;
35 info.icon_index = 0;
36 break;
37 default:
38 NOTREACHED();
39 return ShortcutInfo();
40 }
41 return info;
30 } 42 }
31 43
44
32 string16 GoogleChromeBinariesDistribution::GetStateKey() { 45 string16 GoogleChromeBinariesDistribution::GetStateKey() {
33 return string16(google_update::kRegPathClientState) 46 return string16(google_update::kRegPathClientState)
34 .append(1, L'\\') 47 .append(1, L'\\')
35 .append(kChromeBinariesGuid); 48 .append(kChromeBinariesGuid);
36 } 49 }
37 50
38 string16 GoogleChromeBinariesDistribution::GetStateMediumKey() { 51 string16 GoogleChromeBinariesDistribution::GetStateMediumKey() {
39 return string16(google_update::kRegPathClientStateMedium) 52 return string16(google_update::kRegPathClientStateMedium)
40 .append(1, L'\\') 53 .append(1, L'\\')
41 .append(kChromeBinariesGuid); 54 .append(kChromeBinariesGuid);
42 } 55 }
43 56
44 string16 GoogleChromeBinariesDistribution::GetVersionKey() { 57 string16 GoogleChromeBinariesDistribution::GetVersionKey() {
45 return string16(google_update::kRegPathClients) 58 return string16(google_update::kRegPathClients)
46 .append(1, L'\\') 59 .append(1, L'\\')
47 .append(kChromeBinariesGuid); 60 .append(kChromeBinariesGuid);
48 } 61 }
49 62
50 void GoogleChromeBinariesDistribution::UpdateInstallStatus(bool system_install, 63 void GoogleChromeBinariesDistribution::UpdateInstallStatus(bool system_install,
51 installer::ArchiveType archive_type, 64 installer::ArchiveType archive_type,
52 installer::InstallStatus install_status) { 65 installer::InstallStatus install_status) {
53 GoogleUpdateSettings::UpdateInstallStatus(system_install, 66 GoogleUpdateSettings::UpdateInstallStatus(system_install,
54 archive_type, InstallUtil::GetInstallReturnCode(install_status), 67 archive_type, InstallUtil::GetInstallReturnCode(install_status),
55 kChromeBinariesGuid); 68 kChromeBinariesGuid);
56 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698