Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / installer / util / chrome_frame_distribution.cc
blobd5311b3f3857f8f43d5a1295ce9f67d16891d309
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/installer/util/channel_info.h"
14 #include "chrome/installer/util/google_update_constants.h"
15 #include "chrome/installer/util/google_update_settings.h"
16 #include "chrome/installer/util/helper.h"
17 #include "chrome/installer/util/install_util.h"
18 #include "chrome/installer/util/installer_util_strings.h"
19 #include "chrome/installer/util/l10n_string_util.h"
20 #include "chrome/installer/util/updating_app_registration_data.h"
22 namespace {
23 const wchar_t kChromeFrameGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}";
26 ChromeFrameDistribution::ChromeFrameDistribution()
27 : BrowserDistribution(
28 CHROME_FRAME,
29 scoped_ptr<AppRegistrationData>(
30 new UpdatingAppRegistrationData(kChromeFrameGuid))) {
33 base::string16 ChromeFrameDistribution::GetBaseAppName() {
34 return L"Google Chrome Frame";
37 base::string16 ChromeFrameDistribution::GetBrowserProgIdPrefix() {
38 NOTREACHED();
39 return base::string16();
42 base::string16 ChromeFrameDistribution::GetBrowserProgIdDesc() {
43 NOTREACHED();
44 return base::string16();
47 base::string16 ChromeFrameDistribution::GetDisplayName() {
48 #if defined(GOOGLE_CHROME_BUILD)
49 return L"Google Chrome Frame";
50 #else
51 return L"Chromium Frame";
52 #endif
55 base::string16 ChromeFrameDistribution::GetShortcutName(
56 ShortcutType shortcut_type) {
57 NOTREACHED();
58 return base::string16();
61 base::string16 ChromeFrameDistribution::GetInstallSubDir() {
62 return L"Google\\Chrome Frame";
65 base::string16 ChromeFrameDistribution::GetPublisherName() {
66 const base::string16& publisher_name =
67 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE);
68 return publisher_name;
71 base::string16 ChromeFrameDistribution::GetAppDescription() {
72 return L"Chrome in a Frame.";
75 base::string16 ChromeFrameDistribution::GetLongAppDescription() {
76 return L"Chrome in a Frame.";
79 std::string ChromeFrameDistribution::GetSafeBrowsingName() {
80 return "googlechromeframe";
83 base::string16 ChromeFrameDistribution::GetUninstallRegPath() {
84 return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"
85 L"Google Chrome Frame";
88 base::string16 ChromeFrameDistribution::GetIconFilename() {
89 return installer::kChromeExe;
92 int ChromeFrameDistribution::GetIconIndex(ShortcutType shortcut_type) {
93 switch (shortcut_type) {
94 case SHORTCUT_CHROME:
95 return 0;
96 default:
97 NOTREACHED();
98 return 0;
102 BrowserDistribution::DefaultBrowserControlPolicy
103 ChromeFrameDistribution::GetDefaultBrowserControlPolicy() {
104 return DEFAULT_BROWSER_UNSUPPORTED;
107 bool ChromeFrameDistribution::CanCreateDesktopShortcuts() {
108 return false;
111 base::string16 ChromeFrameDistribution::GetCommandExecuteImplClsid() {
112 return base::string16();
115 void ChromeFrameDistribution::UpdateInstallStatus(bool system_install,
116 installer::ArchiveType archive_type,
117 installer::InstallStatus install_status) {
118 #if defined(GOOGLE_CHROME_BUILD)
119 GoogleUpdateSettings::UpdateInstallStatus(system_install,
120 archive_type, InstallUtil::GetInstallReturnCode(install_status),
121 kChromeFrameGuid);
122 #endif