| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 25 matching lines...) Expand all Loading... |
| 36 BrowserDistribution* g_binaries_distribution = NULL; | 36 BrowserDistribution* g_binaries_distribution = NULL; |
| 37 | 37 |
| 38 // Returns true if currently running in npchrome_frame.dll | 38 // Returns true if currently running in npchrome_frame.dll |
| 39 bool IsChromeFrameModule() { | 39 bool IsChromeFrameModule() { |
| 40 FilePath module_path; | 40 FilePath module_path; |
| 41 PathService::Get(base::FILE_MODULE, &module_path); | 41 PathService::Get(base::FILE_MODULE, &module_path); |
| 42 return FilePath::CompareEqualIgnoreCase(module_path.BaseName().value(), | 42 return FilePath::CompareEqualIgnoreCase(module_path.BaseName().value(), |
| 43 installer::kChromeFrameDll); | 43 installer::kChromeFrameDll); |
| 44 } | 44 } |
| 45 | 45 |
| 46 // Returns true if currently running in ceee_broker.exe | |
| 47 bool IsCeeeBrokerProcess() { | |
| 48 FilePath exe_path; | |
| 49 PathService::Get(base::FILE_EXE, &exe_path); | |
| 50 return FilePath::CompareEqualIgnoreCase(exe_path.BaseName().value(), | |
| 51 installer::kCeeeBrokerExe); | |
| 52 } | |
| 53 | |
| 54 BrowserDistribution::Type GetCurrentDistributionType() { | 46 BrowserDistribution::Type GetCurrentDistributionType() { |
| 55 static BrowserDistribution::Type type = | 47 static BrowserDistribution::Type type = |
| 56 (MasterPreferences::ForCurrentProcess().install_chrome_frame() || | 48 (MasterPreferences::ForCurrentProcess().install_chrome_frame() || |
| 57 IsChromeFrameModule()) ? | 49 IsChromeFrameModule()) ? |
| 58 BrowserDistribution::CHROME_FRAME : | 50 BrowserDistribution::CHROME_FRAME : |
| 59 BrowserDistribution::CHROME_BROWSER; | 51 BrowserDistribution::CHROME_BROWSER; |
| 60 return type; | 52 return type; |
| 61 } | 53 } |
| 62 | 54 |
| 63 } // end namespace | 55 } // end namespace |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 const Version& version, const installer::Product& installation, | 222 const Version& version, const installer::Product& installation, |
| 231 bool system_level) { | 223 bool system_level) { |
| 232 } | 224 } |
| 233 | 225 |
| 234 | 226 |
| 235 void BrowserDistribution::InactiveUserToastExperiment(int flavor, | 227 void BrowserDistribution::InactiveUserToastExperiment(int flavor, |
| 236 const std::wstring& experiment_group, | 228 const std::wstring& experiment_group, |
| 237 const installer::Product& installation, | 229 const installer::Product& installation, |
| 238 const FilePath& application_path) { | 230 const FilePath& application_path) { |
| 239 } | 231 } |
| OLD | NEW |