[sql] Remove _HAS_EXCEPTIONS=0 from build info.
[chromium-blink-merge.git] / chrome / installer / util / chrome_frame_distribution.cc
blob11d8507c6587e0a6325dec0c2c288fed7db0413c
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 specific implementation of BrowserDistribution class for
6 // Chrome Frame. It overrides the bare minimum of methods necessary to get a
7 // Chrome Frame installer that does not interact with Google Chrome or
8 // Chromium installations.
10 #include "chrome/installer/util/chrome_frame_distribution.h"
12 #include "base/strings/string_util.h"
13 #include "chrome/common/net/test_server_locations.h"
14 #include "chrome/installer/util/channel_info.h"
15 #include "chrome/installer/util/google_update_constants.h"
16 #include "chrome/installer/util/google_update_settings.h"
17 #include "chrome/installer/util/helper.h"
18 #include "chrome/installer/util/install_util.h"
19 #include "chrome/installer/util/installer_util_strings.h"
20 #include "chrome/installer/util/l10n_string_util.h"
21 #include "chrome/installer/util/updating_app_registration_data.h"
23 namespace {
24 const wchar_t kChromeFrameGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}";
27 ChromeFrameDistribution::ChromeFrameDistribution()
28 : BrowserDistribution(
29 CHROME_FRAME,
30 scoped_ptr<AppRegistrationData>(
31 new UpdatingAppRegistrationData(kChromeFrameGuid))) {
34 base::string16 ChromeFrameDistribution::GetBaseAppName() {
35 return L"Google Chrome Frame";
38 base::string16 ChromeFrameDistribution::GetBrowserProgIdPrefix() {
39 NOTREACHED();
40 return base::string16();
43 base::string16 ChromeFrameDistribution::GetBrowserProgIdDesc() {
44 NOTREACHED();
45 return base::string16();
48 base::string16 ChromeFrameDistribution::GetDisplayName() {
49 #if defined(GOOGLE_CHROME_BUILD)
50 return L"Google Chrome Frame";
51 #else
52 return L"Chromium Frame";
53 #endif
56 base::string16 ChromeFrameDistribution::GetShortcutName(
57 ShortcutType shortcut_type) {
58 NOTREACHED();
59 return base::string16();
62 base::string16 ChromeFrameDistribution::GetInstallSubDir() {
63 return L"Google\\Chrome Frame";
66 base::string16 ChromeFrameDistribution::GetPublisherName() {
67 const base::string16& publisher_name =
68 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE);
69 return publisher_name;
72 base::string16 ChromeFrameDistribution::GetAppDescription() {
73 return L"Chrome in a Frame.";
76 base::string16 ChromeFrameDistribution::GetLongAppDescription() {
77 return L"Chrome in a Frame.";
80 std::string ChromeFrameDistribution::GetSafeBrowsingName() {
81 return "googlechromeframe";
84 std::string ChromeFrameDistribution::GetNetworkStatsServer() const {
85 return chrome_common_net::kEchoTestServerLocation;
88 base::string16 ChromeFrameDistribution::GetUninstallLinkName() {
89 return L"Uninstall Chrome Frame";
92 base::string16 ChromeFrameDistribution::GetUninstallRegPath() {
93 return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"
94 L"Google Chrome Frame";
97 base::string16 ChromeFrameDistribution::GetIconFilename() {
98 return installer::kChromeExe;
101 int ChromeFrameDistribution::GetIconIndex(ShortcutType shortcut_type) {
102 switch (shortcut_type) {
103 case SHORTCUT_CHROME:
104 return 0;
105 default:
106 NOTREACHED();
107 return 0;
111 BrowserDistribution::DefaultBrowserControlPolicy
112 ChromeFrameDistribution::GetDefaultBrowserControlPolicy() {
113 return DEFAULT_BROWSER_UNSUPPORTED;
116 bool ChromeFrameDistribution::CanCreateDesktopShortcuts() {
117 return false;
120 bool ChromeFrameDistribution::GetCommandExecuteImplClsid(
121 base::string16* handler_class_uuid) {
122 return false;
125 void ChromeFrameDistribution::UpdateInstallStatus(bool system_install,
126 installer::ArchiveType archive_type,
127 installer::InstallStatus install_status) {
128 #if defined(GOOGLE_CHROME_BUILD)
129 GoogleUpdateSettings::UpdateInstallStatus(system_install,
130 archive_type, InstallUtil::GetInstallReturnCode(install_status),
131 kChromeFrameGuid);
132 #endif