Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 specific implementation of BrowserDistribution class for | 5 // This file defines a specific implementation of BrowserDistribution class for |
| 6 // Chrome App Host. It overrides the bare minimum of methods necessary to get a | 6 // Chrome App Host. It overrides the bare minimum of methods necessary to get a |
| 7 // Chrome App Host installer that does not interact with Google Chrome or | 7 // Chrome App Host installer that does not interact with Google Chrome or |
| 8 // Chromium installations. | 8 // Chromium installations. |
| 9 | 9 |
| 10 #include "chrome/installer/util/chrome_app_host_distribution.h" | 10 #include "chrome/installer/util/chrome_app_host_distribution.h" |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 41 installer::GetLocalizedString(IDS_PRODUCT_APP_HOST_NAME_BASE); | 41 installer::GetLocalizedString(IDS_PRODUCT_APP_HOST_NAME_BASE); |
| 42 return product_name; | 42 return product_name; |
| 43 } | 43 } |
| 44 | 44 |
| 45 string16 ChromeAppHostDistribution::GetAlternateApplicationName() { | 45 string16 ChromeAppHostDistribution::GetAlternateApplicationName() { |
| 46 const string16& product_name = | 46 const string16& product_name = |
| 47 installer::GetLocalizedString(IDS_PRODUCT_APP_HOST_NAME_BASE); | 47 installer::GetLocalizedString(IDS_PRODUCT_APP_HOST_NAME_BASE); |
| 48 return product_name; | 48 return product_name; |
| 49 } | 49 } |
| 50 | 50 |
| 51 // TODO(huangs): Override ChromeAppHostDistribution::GetBaseAppId(). | |
|
erikwright (departed)
2012/10/31 19:41:13
I don't think a TODO is needed for this as part of
huangs
2012/10/31 20:49:31
Done.
| |
| 52 | |
| 51 string16 ChromeAppHostDistribution::GetInstallSubDir() { | 53 string16 ChromeAppHostDistribution::GetInstallSubDir() { |
| 52 return BrowserDistribution::GetSpecificDistribution( | 54 return BrowserDistribution::GetSpecificDistribution( |
| 53 BrowserDistribution::CHROME_BINARIES)->GetInstallSubDir(); | 55 BrowserDistribution::CHROME_BINARIES)->GetInstallSubDir(); |
| 54 } | 56 } |
| 55 | 57 |
| 56 string16 ChromeAppHostDistribution::GetPublisherName() { | 58 string16 ChromeAppHostDistribution::GetPublisherName() { |
| 57 const string16& publisher_name = | 59 const string16& publisher_name = |
| 58 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); | 60 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); |
| 59 return publisher_name; | 61 return publisher_name; |
| 60 } | 62 } |
| 61 | 63 |
| 62 string16 ChromeAppHostDistribution::GetAppDescription() { | 64 string16 ChromeAppHostDistribution::GetAppDescription() { |
| 63 NOTREACHED() << "This should never be accessed due to no start-menu/task-bar " | 65 const string16& app_description = |
| 64 << "shortcuts."; | 66 installer::GetLocalizedString(IDS_APP_LAUNCHER_SHORTCUT_TOOLTIP_BASE); |
| 65 return L"A standalone platform for Chrome apps."; | 67 return app_description; |
| 66 } | 68 } |
| 67 | 69 |
| 68 string16 ChromeAppHostDistribution::GetLongAppDescription() { | 70 string16 ChromeAppHostDistribution::GetLongAppDescription() { |
| 69 NOTREACHED() << "This should never be accessed as Chrome App Host is not a " | 71 const string16& app_description = |
| 70 << "default browser option."; | 72 installer::GetLocalizedString(IDS_APP_LAUNCHER_PRODUCT_DESCRIPTION_BASE); |
| 71 return L"A standalone platform for Chrome apps."; | 73 return app_description; |
| 72 } | 74 } |
| 73 | 75 |
| 74 std::string ChromeAppHostDistribution::GetSafeBrowsingName() { | 76 std::string ChromeAppHostDistribution::GetSafeBrowsingName() { |
| 75 return "googlechromeapphost"; | 77 return "googlechromeapphost"; |
| 76 } | 78 } |
| 77 | 79 |
| 78 string16 ChromeAppHostDistribution::GetStateKey() { | 80 string16 ChromeAppHostDistribution::GetStateKey() { |
| 79 string16 key(google_update::kRegPathClientState); | 81 string16 key(google_update::kRegPathClientState); |
| 80 key.append(L"\\"); | 82 key.append(L"\\"); |
| 81 key.append(kChromeAppHostGuid); | 83 key.append(kChromeAppHostGuid); |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 95 | 97 |
| 96 std::string ChromeAppHostDistribution::GetNetworkStatsServer() const { | 98 std::string ChromeAppHostDistribution::GetNetworkStatsServer() const { |
| 97 return chrome_common_net::kEchoTestServerLocation; | 99 return chrome_common_net::kEchoTestServerLocation; |
| 98 } | 100 } |
| 99 | 101 |
| 100 std::string ChromeAppHostDistribution::GetHttpPipeliningTestServer() const { | 102 std::string ChromeAppHostDistribution::GetHttpPipeliningTestServer() const { |
| 101 return chrome_common_net::kPipelineTestServerBaseUrl; | 103 return chrome_common_net::kPipelineTestServerBaseUrl; |
| 102 } | 104 } |
| 103 | 105 |
| 104 string16 ChromeAppHostDistribution::GetUninstallLinkName() { | 106 string16 ChromeAppHostDistribution::GetUninstallLinkName() { |
| 105 NOTREACHED() << "This should never be accessed as Chrome App Host has no " | |
| 106 << "uninstall entry."; | |
| 107 return L"Uninstall Chrome App Host"; | 107 return L"Uninstall Chrome App Host"; |
|
erikwright (departed)
2012/10/31 19:41:13
internationalize
huangs
2012/10/31 20:49:31
Done.
| |
| 108 } | 108 } |
| 109 | 109 |
| 110 string16 ChromeAppHostDistribution::GetUninstallRegPath() { | 110 string16 ChromeAppHostDistribution::GetUninstallRegPath() { |
| 111 NOTREACHED() << "This should never be accessed as Chrome App Host has no " | |
| 112 << "uninstall entry."; | |
| 113 return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" | 111 return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" |
| 114 L"Google Chrome App Host"; | 112 L"Google Chrome App Host"; |
| 115 } | 113 } |
| 116 | 114 |
| 117 string16 ChromeAppHostDistribution::GetVersionKey() { | 115 string16 ChromeAppHostDistribution::GetVersionKey() { |
| 118 string16 key(google_update::kRegPathClients); | 116 string16 key(google_update::kRegPathClients); |
| 119 key.append(L"\\"); | 117 key.append(L"\\"); |
| 120 key.append(kChromeAppHostGuid); | 118 key.append(kChromeAppHostGuid); |
| 121 return key; | 119 return key; |
| 122 } | 120 } |
| 123 | 121 |
| 124 bool ChromeAppHostDistribution::CanSetAsDefault() { | 122 bool ChromeAppHostDistribution::CanSetAsDefault() { |
| 125 return false; | 123 return false; |
| 126 } | 124 } |
| 127 | 125 |
| 128 bool ChromeAppHostDistribution::CanCreateDesktopShortcuts() { | 126 bool ChromeAppHostDistribution::CanCreateDesktopShortcuts() { |
| 127 // TODO(huangs): return true. | |
|
erikwright (departed)
2012/10/31 19:41:13
Not needed at this point.
huangs
2012/10/31 20:49:31
Done.
| |
| 129 return false; | 128 return false; |
| 130 } | 129 } |
| 131 | 130 |
| 132 bool ChromeAppHostDistribution::GetCommandExecuteImplClsid( | 131 bool ChromeAppHostDistribution::GetCommandExecuteImplClsid( |
| 133 string16* handler_class_uuid) { | 132 string16* handler_class_uuid) { |
| 134 return false; | 133 return false; |
| 135 } | 134 } |
| 136 | 135 |
| 137 void ChromeAppHostDistribution::UpdateInstallStatus(bool system_install, | 136 void ChromeAppHostDistribution::UpdateInstallStatus(bool system_install, |
| 138 installer::ArchiveType archive_type, | 137 installer::ArchiveType archive_type, |
| 139 installer::InstallStatus install_status) { | 138 installer::InstallStatus install_status) { |
| 140 #if defined(GOOGLE_CHROME_BUILD) | 139 #if defined(GOOGLE_CHROME_BUILD) |
| 141 GoogleUpdateSettings::UpdateInstallStatus(system_install, | 140 GoogleUpdateSettings::UpdateInstallStatus(system_install, |
| 142 archive_type, InstallUtil::GetInstallReturnCode(install_status), | 141 archive_type, InstallUtil::GetInstallReturnCode(install_status), |
| 143 kChromeAppHostGuid); | 142 kChromeAppHostGuid); |
| 144 #endif | 143 #endif |
| 145 } | 144 } |
| OLD | NEW |