Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1123)

Side by Side Diff: chrome/installer/util/browser_distribution.cc

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 class that contains various method related to branding. 5 // This file defines a class that contains various method related to branding.
6 // It provides only default implementations of these methods. Usually to add 6 // It provides only default implementations of these methods. Usually to add
7 // specific branding, we will need to extend this class with a custom 7 // specific branding, we will need to extend this class with a custom
8 // implementation. 8 // implementation.
9 9
10 #include "chrome/installer/util/browser_distribution.h" 10 #include "chrome/installer/util/browser_distribution.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 148
149 string16 BrowserDistribution::GetAppGuid() { 149 string16 BrowserDistribution::GetAppGuid() {
150 return L""; 150 return L"";
151 } 151 }
152 152
153 string16 BrowserDistribution::GetBaseAppName() { 153 string16 BrowserDistribution::GetBaseAppName() {
154 return L"Chromium"; 154 return L"Chromium";
155 } 155 }
156 156
157 string16 BrowserDistribution::GetDisplayName() {
158 return GetShortcutInfo(SHORTCUT_CHROME).name;
159 }
160
157 string16 BrowserDistribution::GetAppShortCutName() { 161 string16 BrowserDistribution::GetAppShortCutName() {
158 return GetBaseAppName(); 162 return GetBaseAppName();
159 } 163 }
160 164
161 string16 BrowserDistribution::GetAlternateApplicationName() { 165 string16 BrowserDistribution::GetAlternateApplicationName() {
162 return L"The Internet"; 166 return L"The Internet";
163 } 167 }
164 168
169 BrowserDistribution::ShortcutInfo BrowserDistribution::GetShortcutInfo(
170 ShortcutEnum shortcut_enum) {
171 ShortcutInfo info;
172 switch (shortcut_enum) {
173 case SHORTCUT_CHROME:
174 info.name = GetAppShortCutName();
175 info.icon_index = GetIconIndex();
176 info.icon_file = GetIconFilename();
177 break;
178 case SHORTCUT_ALTERNATE_CHROME:
179 info.name = GetAlternateApplicationName();
180 info.icon_index = GetIconIndex();
181 info.icon_file = GetIconFilename();
182 break;
183 default:
184 NOTREACHED();
185 }
186 return info;
187 }
188
189 string16 BrowserDistribution::GetStartMenuShortcutSubfolder(
190 SubfolderEnum subfolder_enum) {
191 switch (subfolder_enum) {
192 case SUBFOLDER_CHROME:
193 return GetShortcutInfo(SHORTCUT_CHROME).name;
194 break;
195 default:
196 NOTREACHED();
197 return string16();
198 }
199 }
200
165 string16 BrowserDistribution::GetBaseAppId() { 201 string16 BrowserDistribution::GetBaseAppId() {
166 return L"Chromium"; 202 return L"Chromium";
167 } 203 }
168 204
169 string16 BrowserDistribution::GetInstallSubDir() { 205 string16 BrowserDistribution::GetInstallSubDir() {
170 return L"Chromium"; 206 return L"Chromium";
171 } 207 }
172 208
173 string16 BrowserDistribution::GetPublisherName() { 209 string16 BrowserDistribution::GetPublisherName() {
174 return L"Chromium"; 210 return L"Chromium";
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 installer::InstallStatus install_status) { 294 installer::InstallStatus install_status) {
259 } 295 }
260 296
261 bool BrowserDistribution::ShouldSetExperimentLabels() { 297 bool BrowserDistribution::ShouldSetExperimentLabels() {
262 return false; 298 return false;
263 } 299 }
264 300
265 bool BrowserDistribution::HasUserExperiments() { 301 bool BrowserDistribution::HasUserExperiments() {
266 return false; 302 return false;
267 } 303 }
304
305 int BrowserDistribution::GetAppListIconIndex() {
306 return 1;
307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698