OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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" |
11 | 11 |
| 12 #include "base/command_line.h" |
12 #include "base/registry.h" | 13 #include "base/registry.h" |
| 14 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/common/env_vars.h" |
| 16 #include "chrome/installer/util/chrome_frame_distribution.h" |
13 #include "chrome/installer/util/google_chrome_distribution.h" | 17 #include "chrome/installer/util/google_chrome_distribution.h" |
14 #include "chrome/installer/util/chrome_frame_distribution.h" | 18 #include "chrome/installer/util/install_util.h" |
15 | 19 |
16 BrowserDistribution* BrowserDistribution::GetDistribution() { | 20 BrowserDistribution* BrowserDistribution::GetDistribution() { |
| 21 return GetDistribution(InstallUtil::IsChromeFrameProcess()); |
| 22 } |
| 23 |
| 24 BrowserDistribution* BrowserDistribution::GetDistribution(bool chrome_frame) { |
17 static BrowserDistribution* dist = NULL; | 25 static BrowserDistribution* dist = NULL; |
18 if (dist == NULL) { | 26 if (dist == NULL) { |
19 #if defined(CHROME_FRAME_BUILD) | 27 if (chrome_frame) { |
20 dist = new ChromeFrameDistribution(); | 28 // TODO(robertshield): Make one of these for Google Chrome vs |
21 #elif defined(GOOGLE_CHROME_BUILD) | 29 // non Google Chrome builds? |
22 dist = new GoogleChromeDistribution(); | 30 dist = new ChromeFrameDistribution(); |
| 31 } else { |
| 32 #if defined(GOOGLE_CHROME_BUILD) |
| 33 dist = new GoogleChromeDistribution(); |
23 #else | 34 #else |
24 dist = new BrowserDistribution(); | 35 dist = new BrowserDistribution(); |
25 #endif | 36 #endif |
| 37 } |
26 } | 38 } |
27 return dist; | 39 return dist; |
28 } | 40 } |
29 | 41 |
30 void BrowserDistribution::DoPostUninstallOperations( | 42 void BrowserDistribution::DoPostUninstallOperations( |
31 const installer::Version& version, const std::wstring& local_data_path, | 43 const installer::Version& version, const std::wstring& local_data_path, |
32 const std::wstring& distribution_data) { | 44 const std::wstring& distribution_data) { |
33 } | 45 } |
34 | 46 |
35 std::wstring BrowserDistribution::GetApplicationName() { | 47 std::wstring BrowserDistribution::GetApplicationName() { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 102 } |
91 | 103 |
92 void BrowserDistribution::LaunchUserExperiment( | 104 void BrowserDistribution::LaunchUserExperiment( |
93 installer_util::InstallStatus status, const installer::Version& version, | 105 installer_util::InstallStatus status, const installer::Version& version, |
94 bool system_install) { | 106 bool system_install) { |
95 } | 107 } |
96 | 108 |
97 | 109 |
98 void BrowserDistribution::InactiveUserToastExperiment(int flavor) { | 110 void BrowserDistribution::InactiveUserToastExperiment(int flavor) { |
99 } | 111 } |
OLD | NEW |