OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 specific implementation of BrowserDistribution class for | 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 | 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 | 7 // Chrome Frame installer that does not interact with Google Chrome or |
8 // Chromium installations. | 8 // Chromium installations. |
9 | 9 |
10 #include "chrome/installer/util/chrome_frame_distribution.h" | 10 #include "chrome/installer/util/chrome_frame_distribution.h" |
11 | 11 |
12 #include <string> | 12 #include <string> |
13 | 13 |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "chrome/installer/util/google_update_constants.h" | 15 #include "chrome/installer/util/google_update_constants.h" |
16 #include "chrome/installer/util/google_update_settings.h" | 16 #include "chrome/installer/util/google_update_settings.h" |
17 #include "chrome/installer/util/l10n_string_util.h" | 17 #include "chrome/installer/util/l10n_string_util.h" |
18 #include "chrome/installer/util/master_preferences.h" | 18 #include "chrome/installer/util/master_preferences.h" |
19 | 19 |
20 #include "installer_util_strings.h" // NOLINT | 20 #include "installer_util_strings.h" // NOLINT |
21 | 21 |
22 namespace { | 22 namespace { |
23 const wchar_t kChromeFrameGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}"; | 23 const wchar_t kChromeFrameGuid[] = L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}"; |
24 } | 24 } |
25 | 25 |
26 ChromeFrameDistribution::ChromeFrameDistribution( | 26 ChromeFrameDistribution::ChromeFrameDistribution( |
27 const installer_util::MasterPreferences& prefs) | 27 const installer::MasterPreferences& prefs) |
28 : BrowserDistribution(prefs) { | 28 : BrowserDistribution(prefs) { |
29 type_ = BrowserDistribution::CHROME_FRAME; | 29 type_ = BrowserDistribution::CHROME_FRAME; |
30 ceee_ = prefs.install_ceee(); | 30 ceee_ = prefs.install_ceee(); |
31 } | 31 } |
32 | 32 |
33 std::wstring ChromeFrameDistribution::GetAppGuid() { | 33 std::wstring ChromeFrameDistribution::GetAppGuid() { |
34 return kChromeFrameGuid; | 34 return kChromeFrameGuid; |
35 } | 35 } |
36 | 36 |
37 std::wstring ChromeFrameDistribution::GetApplicationName() { | 37 std::wstring ChromeFrameDistribution::GetApplicationName() { |
38 const std::wstring& product_name = | 38 const std::wstring& product_name = |
39 installer_util::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE); | 39 installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE); |
40 return product_name; | 40 return product_name; |
41 } | 41 } |
42 | 42 |
43 std::wstring ChromeFrameDistribution::GetAlternateApplicationName() { | 43 std::wstring ChromeFrameDistribution::GetAlternateApplicationName() { |
44 const std::wstring& product_name = | 44 const std::wstring& product_name = |
45 installer_util::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE); | 45 installer::GetLocalizedString(IDS_PRODUCT_FRAME_NAME_BASE); |
46 return product_name; | 46 return product_name; |
47 } | 47 } |
48 | 48 |
49 std::wstring ChromeFrameDistribution::GetInstallSubDir() { | 49 std::wstring ChromeFrameDistribution::GetInstallSubDir() { |
50 return L"Google\\Chrome Frame"; | 50 return L"Google\\Chrome Frame"; |
51 } | 51 } |
52 | 52 |
53 std::wstring ChromeFrameDistribution::GetPublisherName() { | 53 std::wstring ChromeFrameDistribution::GetPublisherName() { |
54 const std::wstring& publisher_name = | 54 const std::wstring& publisher_name = |
55 installer_util::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); | 55 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); |
56 return publisher_name; | 56 return publisher_name; |
57 } | 57 } |
58 | 58 |
59 std::wstring ChromeFrameDistribution::GetAppDescription() { | 59 std::wstring ChromeFrameDistribution::GetAppDescription() { |
60 return L"Chrome in a Frame."; | 60 return L"Chrome in a Frame."; |
61 } | 61 } |
62 | 62 |
63 std::wstring ChromeFrameDistribution::GetLongAppDescription() { | 63 std::wstring ChromeFrameDistribution::GetLongAppDescription() { |
64 return L"Chrome in a Frame."; | 64 return L"Chrome in a Frame."; |
65 } | 65 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 key.append(L"\\"); | 100 key.append(L"\\"); |
101 key.append(kChromeFrameGuid); | 101 key.append(kChromeFrameGuid); |
102 return key; | 102 return key; |
103 } | 103 } |
104 | 104 |
105 bool ChromeFrameDistribution::CanSetAsDefault() { | 105 bool ChromeFrameDistribution::CanSetAsDefault() { |
106 return false; | 106 return false; |
107 } | 107 } |
108 | 108 |
109 void ChromeFrameDistribution::UpdateDiffInstallStatus(bool system_install, | 109 void ChromeFrameDistribution::UpdateDiffInstallStatus(bool system_install, |
110 bool incremental_install, installer_util::InstallStatus install_status) { | 110 bool incremental_install, installer::InstallStatus install_status) { |
111 GoogleUpdateSettings::UpdateDiffInstallStatus(system_install, | 111 GoogleUpdateSettings::UpdateDiffInstallStatus(system_install, |
112 incremental_install, GetInstallReturnCode(install_status), | 112 incremental_install, GetInstallReturnCode(install_status), |
113 kChromeFrameGuid); | 113 kChromeFrameGuid); |
114 } | 114 } |
115 | 115 |
116 std::vector<FilePath> ChromeFrameDistribution::GetKeyFiles() { | 116 std::vector<FilePath> ChromeFrameDistribution::GetKeyFiles() { |
117 std::vector<FilePath> key_files; | 117 std::vector<FilePath> key_files; |
118 key_files.push_back(FilePath(installer_util::kChromeFrameDll)); | 118 key_files.push_back(FilePath(installer::kChromeFrameDll)); |
119 if (ceee_) { | 119 if (ceee_) { |
120 key_files.push_back(FilePath(installer_util::kCeeeIeDll)); | 120 key_files.push_back(FilePath(installer::kCeeeIeDll)); |
121 key_files.push_back(FilePath(installer_util::kCeeeBrokerExe)); | 121 key_files.push_back(FilePath(installer::kCeeeBrokerExe)); |
122 } | 122 } |
123 return key_files; | 123 return key_files; |
124 } | 124 } |
125 | 125 |
126 std::vector<FilePath> ChromeFrameDistribution::GetComDllList() { | 126 std::vector<FilePath> ChromeFrameDistribution::GetComDllList() { |
127 std::vector<FilePath> dll_list; | 127 std::vector<FilePath> dll_list; |
128 dll_list.push_back(FilePath(installer_util::kChromeFrameDll)); | 128 dll_list.push_back(FilePath(installer::kChromeFrameDll)); |
129 if (ceee_) { | 129 if (ceee_) { |
130 dll_list.push_back(FilePath(installer_util::kCeeeInstallHelperDll)); | 130 dll_list.push_back(FilePath(installer::kCeeeInstallHelperDll)); |
131 dll_list.push_back(FilePath(installer_util::kCeeeIeDll)); | 131 dll_list.push_back(FilePath(installer::kCeeeIeDll)); |
132 } | 132 } |
133 return dll_list; | 133 return dll_list; |
134 } | 134 } |
135 | 135 |
136 void ChromeFrameDistribution::AppendUninstallCommandLineFlags( | 136 void ChromeFrameDistribution::AppendUninstallCommandLineFlags( |
137 CommandLine* cmd_line) { | 137 CommandLine* cmd_line) { |
138 DCHECK(cmd_line); | 138 DCHECK(cmd_line); |
139 cmd_line->AppendSwitch(installer_util::switches::kDeleteProfile); | 139 cmd_line->AppendSwitch(installer::switches::kDeleteProfile); |
140 cmd_line->AppendSwitch(installer_util::switches::kChromeFrame); | 140 cmd_line->AppendSwitch(installer::switches::kChromeFrame); |
141 if (ceee_) { | 141 if (ceee_) { |
142 cmd_line->AppendSwitch(installer_util::switches::kCeee); | 142 cmd_line->AppendSwitch(installer::switches::kCeee); |
143 } | 143 } |
144 } | 144 } |
OLD | NEW |