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 string16 ChromeAppHostDistribution::GetBaseAppId() { | |
52 // See AppListController::GetAppModelId(). | |
erikwright (departed)
2012/10/30 14:20:39
separate
huangs
2012/10/30 20:35:07
Done (adding TODO).
| |
53 return L"ChromeAppList"; | |
54 } | |
55 | |
51 string16 ChromeAppHostDistribution::GetInstallSubDir() { | 56 string16 ChromeAppHostDistribution::GetInstallSubDir() { |
52 return BrowserDistribution::GetSpecificDistribution( | 57 return BrowserDistribution::GetSpecificDistribution( |
53 BrowserDistribution::CHROME_BINARIES)->GetInstallSubDir(); | 58 BrowserDistribution::CHROME_BINARIES)->GetInstallSubDir(); |
54 } | 59 } |
55 | 60 |
56 string16 ChromeAppHostDistribution::GetPublisherName() { | 61 string16 ChromeAppHostDistribution::GetPublisherName() { |
57 const string16& publisher_name = | 62 const string16& publisher_name = |
58 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); | 63 installer::GetLocalizedString(IDS_ABOUT_VERSION_COMPANY_NAME_BASE); |
59 return publisher_name; | 64 return publisher_name; |
60 } | 65 } |
61 | 66 |
62 string16 ChromeAppHostDistribution::GetAppDescription() { | 67 string16 ChromeAppHostDistribution::GetAppDescription() { |
63 NOTREACHED() << "This should never be accessed due to no start-menu/task-bar " | |
64 << "shortcuts."; | |
65 return L"A standalone platform for Chrome apps."; | 68 return L"A standalone platform for Chrome apps."; |
erikwright (departed)
2012/10/30 14:20:39
Needs to be internationalized (moved to a resource
huangs
2012/10/30 20:35:07
Done.
| |
66 } | 69 } |
67 | 70 |
68 string16 ChromeAppHostDistribution::GetLongAppDescription() { | 71 string16 ChromeAppHostDistribution::GetLongAppDescription() { |
69 NOTREACHED() << "This should never be accessed as Chrome App Host is not a " | |
70 << "default browser option."; | |
71 return L"A standalone platform for Chrome apps."; | 72 return L"A standalone platform for Chrome apps."; |
erikwright (departed)
2012/10/30 14:20:39
Ditto.
huangs
2012/10/30 20:35:07
Done.
| |
72 } | 73 } |
73 | 74 |
74 std::string ChromeAppHostDistribution::GetSafeBrowsingName() { | 75 std::string ChromeAppHostDistribution::GetSafeBrowsingName() { |
75 return "googlechromeapphost"; | 76 return "googlechromeapphost"; |
76 } | 77 } |
77 | 78 |
78 string16 ChromeAppHostDistribution::GetStateKey() { | 79 string16 ChromeAppHostDistribution::GetStateKey() { |
79 string16 key(google_update::kRegPathClientState); | 80 string16 key(google_update::kRegPathClientState); |
80 key.append(L"\\"); | 81 key.append(L"\\"); |
81 key.append(kChromeAppHostGuid); | 82 key.append(kChromeAppHostGuid); |
(...skipping 13 matching lines...) Expand all Loading... | |
95 | 96 |
96 std::string ChromeAppHostDistribution::GetNetworkStatsServer() const { | 97 std::string ChromeAppHostDistribution::GetNetworkStatsServer() const { |
97 return chrome_common_net::kEchoTestServerLocation; | 98 return chrome_common_net::kEchoTestServerLocation; |
98 } | 99 } |
99 | 100 |
100 std::string ChromeAppHostDistribution::GetHttpPipeliningTestServer() const { | 101 std::string ChromeAppHostDistribution::GetHttpPipeliningTestServer() const { |
101 return chrome_common_net::kPipelineTestServerBaseUrl; | 102 return chrome_common_net::kPipelineTestServerBaseUrl; |
102 } | 103 } |
103 | 104 |
104 string16 ChromeAppHostDistribution::GetUninstallLinkName() { | 105 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"; | 106 return L"Uninstall Chrome App Host"; |
108 } | 107 } |
109 | 108 |
110 string16 ChromeAppHostDistribution::GetUninstallRegPath() { | 109 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\\" | 110 return L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" |
114 L"Google Chrome App Host"; | 111 L"Google Chrome App Host"; |
115 } | 112 } |
116 | 113 |
117 string16 ChromeAppHostDistribution::GetVersionKey() { | 114 string16 ChromeAppHostDistribution::GetVersionKey() { |
118 string16 key(google_update::kRegPathClients); | 115 string16 key(google_update::kRegPathClients); |
119 key.append(L"\\"); | 116 key.append(L"\\"); |
120 key.append(kChromeAppHostGuid); | 117 key.append(kChromeAppHostGuid); |
121 return key; | 118 return key; |
122 } | 119 } |
123 | 120 |
124 bool ChromeAppHostDistribution::CanSetAsDefault() { | 121 bool ChromeAppHostDistribution::CanSetAsDefault() { |
125 return false; | 122 return false; |
126 } | 123 } |
127 | 124 |
128 bool ChromeAppHostDistribution::CanCreateDesktopShortcuts() { | 125 bool ChromeAppHostDistribution::CanCreateDesktopShortcuts() { |
129 return false; | 126 return true; |
erikwright (departed)
2012/10/30 14:20:39
separate
huangs
2012/10/30 20:35:07
Done. (Added TODO).
| |
130 } | 127 } |
131 | 128 |
132 bool ChromeAppHostDistribution::GetCommandExecuteImplClsid( | 129 bool ChromeAppHostDistribution::GetCommandExecuteImplClsid( |
133 string16* handler_class_uuid) { | 130 string16* handler_class_uuid) { |
134 return false; | 131 return false; |
135 } | 132 } |
136 | 133 |
137 void ChromeAppHostDistribution::UpdateInstallStatus(bool system_install, | 134 void ChromeAppHostDistribution::UpdateInstallStatus(bool system_install, |
138 installer::ArchiveType archive_type, | 135 installer::ArchiveType archive_type, |
139 installer::InstallStatus install_status) { | 136 installer::InstallStatus install_status) { |
140 #if defined(GOOGLE_CHROME_BUILD) | 137 #if defined(GOOGLE_CHROME_BUILD) |
141 GoogleUpdateSettings::UpdateInstallStatus(system_install, | 138 GoogleUpdateSettings::UpdateInstallStatus(system_install, |
142 archive_type, InstallUtil::GetInstallReturnCode(install_status), | 139 archive_type, InstallUtil::GetInstallReturnCode(install_status), |
143 kChromeAppHostGuid); | 140 kChromeAppHostGuid); |
144 #endif | 141 #endif |
145 } | 142 } |
OLD | NEW |