blob: 68379d0c78d57d1424eae221f0de2ec4dcefd419 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file defines a specific implementation of BrowserDistribution class for
// Chrome Frame. It overrides the bare minimum of methods necessary to get a
// Chrome Frame installer that does not interact with Google Chrome or
// Chromium installations.
#include "chrome/installer/util/chrome_frame_distribution.h"
#include "base/strings/string_util.h"
#include "chrome/common/net/test_server_locations.h"
#include "chrome/installer/util/channel_info.h"
#include "chrome/installer/util/google_update_constants.h"
#include "chrome/installer/util/google_update_settings.h"
#include "chrome/installer/util/helper.h"
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/l10n_string_util.h"
#include "installer_util_strings.h" // NOLINT
namespace {
const wchar_t kChromeFrameGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}";
}
ChromeFrameDistribution::ChromeFrameDistribution()
: BrowserDistribution(CHROME_FRAME) {
}
string16 ChromeFrameDistribution::GetAppGuid() {
return kChromeFrameGuid;
}
string16 ChromeFrameDistribution::GetBaseAppName() {
return L"Google Chrome Frame";
}
string16 ChromeFrameDistribution::GetAppShortCutName() {
const string16& product_name =
installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE);
return product_name;
}
string16 ChromeFrameDistribution::GetAlternateApplicationName() {
const string16& product_name =
installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE);
return product_name;
}
string16 ChromeFrameDistribution::GetInstallSubDir() {
return L"Google\\Chrome Frame";
}
string16 ChromeFrameDistribution::GetPublisherName() {
const string16& publisher_name =
installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE);
return publisher_name;
}
string16 ChromeFrameDistribution::GetAppDescription() {
return L"Chrome in a Frame.";
}
string16 ChromeFrameDistribution::GetLongAppDescription() {
return L"Chrome in a Frame.";
}
std::string ChromeFrameDistribution::GetSafeBrowsingName() {
return "googlechromeframe";
}
string16 ChromeFrameDistribution::GetStateKey() {
string16 key(google_update::kRegPathClientState);
key.append(L"\\");
key.append(kChromeFrameGuid);
return key;
}
string16 ChromeFrameDistribution::GetStateMediumKey() {
string16 key(google_update::kRegPathClientStateMedium);
key.append(L"\\");
key.append(kChromeFrameGuid);
return key;
}
std::string ChromeFrameDistribution::GetNetworkStatsServer() const {
return chrome_common_net::kEchoTestServerLocation;
}
std::string ChromeFrameDistribution::GetHttpPipeliningTestServer() const {
return chrome_common_net::kPipelineTestServerBaseUrl;
}
string16 ChromeFrameDistribution::GetUninstallLinkName() {
return L"Uninstall Chrome Frame";
}
string16 ChromeFrameDistribution::GetUninstallRegPath() {
return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"
L"Google Chrome Frame";
}
string16 ChromeFrameDistribution::GetVersionKey() {
string16 key(google_update::kRegPathClients);
key.append(L"\\");
key.append(kChromeFrameGuid);
return key;
}
string16 ChromeFrameDistribution::GetIconFilename() {
return installer::kChromeExe;
}
int ChromeFrameDistribution::GetIconIndex() {
return 0;
}
bool ChromeFrameDistribution::CanSetAsDefault() {
return false;
}
bool ChromeFrameDistribution::CanCreateDesktopShortcuts() {
return false;
}
bool ChromeFrameDistribution::GetCommandExecuteImplClsid(
string16* handler_class_uuid) {
return false;
}
void ChromeFrameDistribution::UpdateInstallStatus(bool system_install,
installer::ArchiveType archive_type,
installer::InstallStatus install_status) {
#if defined(GOOGLE_CHROME_BUILD)
GoogleUpdateSettings::UpdateInstallStatus(system_install,
archive_type, InstallUtil::GetInstallReturnCode(install_status),
kChromeFrameGuid);
#endif
}
|